Browse Source

Fix the Windows build by not storing Unicode in std::string

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1187/merge
Dimitar Dobrev 7 years ago
parent
commit
14e0ff958b
  1. 12
      tests/Encodings/Encodings.Tests.cs
  2. 2
      tests/Encodings/Encodings.cpp
  3. 3
      tests/Encodings/Encodings.h

12
tests/Encodings/Encodings.Tests.cs

@ -7,14 +7,14 @@ public class EncodingsTests : GeneratorTestFixture
[Test] [Test]
public void TestFoo() public void TestFoo()
{ {
const string georgia = "საქართველო";
Foo.Unicode = georgia;
Assert.That(Foo.Unicode, Is.EqualTo(georgia));
// TODO: move this, it has nothing to do with Unicode, it's here only not to break the CLI branch
using (var foo = new Foo()) using (var foo = new Foo())
{ {
const string georgia = "საქართველო";
foo.Unicode = georgia;
Assert.That(foo.Unicode, Is.EqualTo(georgia));
// TODO: move this, it has nothing to do with Unicode, it's here only not to break the CLI branch
Assert.That(foo[0], Is.EqualTo(5)); Assert.That(foo[0], Is.EqualTo(5));
} }
} }
} }

2
tests/Encodings/Encodings.cpp

@ -1,6 +1,6 @@
#include "Encodings.h" #include "Encodings.h"
std::string Foo::Unicode = ""; std::string Foo::StringVariable = "";
Foo::Foo() Foo::Foo()
{ {

3
tests/Encodings/Encodings.h

@ -7,7 +7,8 @@ public:
Foo(); Foo();
~Foo(); ~Foo();
static std::string Unicode; const char* Unicode;
static std::string StringVariable;
// TODO: VC++ does not support char16 // TODO: VC++ does not support char16
// char16 chr16; // char16 chr16;

Loading…
Cancel
Save