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
{ {
using (Foo foo = new Foo { A = 5, B = 5.5f }) using (Foo foo = new Foo { A = 5, B = 5.5f })
{ {
Assert.That(foo.Init, Is.EqualTo(20));
using (var copyFoo = new Foo(foo)) using (var copyFoo = new Foo(foo))
{ {
Assert.That(foo.A, Is.EqualTo(copyFoo.A)); Assert.That(foo.A, Is.EqualTo(copyFoo.A));

1
tests/Common/Common.h

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

Loading…
Cancel
Save