Skip to content

Commit 14e0ff9

Browse files
committed
Fix the Windows build by not storing Unicode in std::string
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 5381628 commit 14e0ff9

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

tests/Encodings/Encodings.Tests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ public class EncodingsTests : GeneratorTestFixture
77
[Test]
88
public void TestFoo()
99
{
10-
const string georgia = "საქართველო";
11-
Foo.Unicode = georgia;
12-
Assert.That(Foo.Unicode, Is.EqualTo(georgia));
13-
14-
// TODO: move this, it has nothing to do with Unicode, it's here only not to break the CLI branch
1510
using (var foo = new Foo())
1611
{
12+
const string georgia = "საქართველო";
13+
foo.Unicode = georgia;
14+
Assert.That(foo.Unicode, Is.EqualTo(georgia));
15+
16+
// TODO: move this, it has nothing to do with Unicode, it's here only not to break the CLI branch
1717
Assert.That(foo[0], Is.EqualTo(5));
1818
}
1919
}
20-
}
20+
}

tests/Encodings/Encodings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "Encodings.h"
22

3-
std::string Foo::Unicode = "";
3+
std::string Foo::StringVariable = "";
44

55
Foo::Foo()
66
{

tests/Encodings/Encodings.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ class DLL_API Foo
77
Foo();
88
~Foo();
99

10-
static std::string Unicode;
10+
const char* Unicode;
11+
static std::string StringVariable;
1112

1213
// TODO: VC++ does not support char16
1314
// char16 chr16;

0 commit comments

Comments
 (0)