Browse Source

Test C++11 in-class member initializers

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1580/head
Dimitar Dobrev 5 years ago
parent
commit
1209f1af42
  1. 1
      tests/Common/Common.Tests.cs
  2. 1
      tests/Common/Common.h

1
tests/Common/Common.Tests.cs

@ -427,6 +427,7 @@ public class CommonTests @@ -427,6 +427,7 @@ public class CommonTests
{
using (Foo foo = new Foo { A = 5, B = 5.5f })
{
Assert.That(foo.Init, Is.EqualTo(20));
using (var copyFoo = new Foo(foo))
{
Assert.That(foo.A, Is.EqualTo(copyFoo.A));

1
tests/Common/Common.h

@ -89,6 +89,7 @@ public: @@ -89,6 +89,7 @@ public:
Foo(const float& f);
int A;
float B;
int Init = 20;
IgnoredType ignoredType;
int fixedArray[3];
char fixedCharArray[3];

Loading…
Cancel
Save