.autotest

git-svn-id: svn://ultimatepp.org/upp/trunk@11572 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-12-18 12:11:09 +00:00
parent 434d4a4bf1
commit d151be77ab

View file

@ -40,15 +40,15 @@ void TestCreateT()
Vector<int> v;
v.Add(12);
// Copy-constructor
h.Create<Test>(v, 22);
h.template Create<Test>(v, 22);
DDUMP(v.GetCount());
ASSERT(v.GetCount() == 1);
// Move-constructor
h.Create<Test>(pick(v), 22);
h.template Create<Test>(pick(v), 22);
DDUMP(v.GetCount());
ASSERT(v.GetCount() == 0);
v.Add(21);
h.Create<Test>(clone(v), 22);
h.template Create<Test>(clone(v), 22);
DDUMP(v.GetCount());
ASSERT(v.GetCount() == 1);
}
@ -61,15 +61,15 @@ void TestCreateMap()
Vector<int> v;
v.Add(12);
// Copy-constructor
h.Create<Test>("a", v, 22);
h.template Create<Test>("a", v, 22);
DDUMP(v.GetCount());
ASSERT(v.GetCount() == 1);
// Move-constructor
h.Create<Test>("a", pick(v), 22);
h.template Create<Test>("a", pick(v), 22);
DDUMP(v.GetCount());
ASSERT(v.GetCount() == 0);
v.Add(21);
h.Create<Test>("a", clone(v), 22);
h.template Create<Test>("a", clone(v), 22);
DDUMP(v.GetCount());
ASSERT(v.GetCount() == 1);
}