diff --git a/tests/UTF16/UTF16.Tests.cs b/tests/UTF16/UTF16.Tests.cs index 0a4599b6..c9f1a2ed 100644 --- a/tests/UTF16/UTF16.Tests.cs +++ b/tests/UTF16/UTF16.Tests.cs @@ -1,5 +1,6 @@ -using NUnit.Framework; -using UTF16; +using System; +using NUnit.Framework; +using Foo = UTF16.Foo; [TestFixture] public class UTF16Tests @@ -11,5 +12,9 @@ public class UTF16Tests 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.OperatorSubscript(0), Is.EqualTo(IntPtr.Zero)); } } diff --git a/tests/UTF16/UTF16.cpp b/tests/UTF16/UTF16.cpp index 566968cf..ed65b3d8 100644 --- a/tests/UTF16/UTF16.cpp +++ b/tests/UTF16/UTF16.cpp @@ -1 +1,12 @@ -#include "UTF16.h" \ No newline at end of file +#include "UTF16.h" + +// TODO: move this, it has nothing to do with Unicode, it's here only not to break the CLI branch +int Foo::operator[](int i) const +{ + return 5; +} + +char* Foo::operator[](int i) +{ + return 0; +} \ No newline at end of file diff --git a/tests/UTF16/UTF16.h b/tests/UTF16/UTF16.h index 13da5e79..16f29e28 100644 --- a/tests/UTF16/UTF16.h +++ b/tests/UTF16/UTF16.h @@ -8,6 +8,10 @@ class DLL_API Foo { public: const char* Unicode; + + // TODO: move this, it has nothing to do with Unicode, it's here only not to break the CLI branch + int operator[](int i) const; + char* operator[](int i); }; DLL_API int FooCallFoo(Foo* foo);