Commits

Matt Oswald committed 7154ed6

fixed missing test names

  • Participants
  • Parent commits efea9c0

Comments (0)

Files changed (1)

xUnit++/src/TestCollection.cpp

 TestCollection::Register::Register(TestCollection &collection, std::function<void()> &&fn, std::string &&name, const std::string &suite,
             AttributeCollection &&attributes, int milliseconds, std::string &&filename, int line, std::vector<std::shared_ptr<TestEventRecorder>> &&testEventRecorders)
 {
-    collection.mTests.push_back(std::make_shared<xUnitTest>(std::move(fn), std::move(name), std::move(name), suite, std::move(attributes), Time::ToDuration(Time::ToMilliseconds(milliseconds)), std::move(filename), line, std::move(testEventRecorders)));
+    auto shortName = name;
+    collection.mTests.push_back(std::make_shared<xUnitTest>(std::move(fn), std::move(shortName), std::move(name), suite, std::move(attributes), Time::ToDuration(Time::ToMilliseconds(milliseconds)), std::move(filename), line, std::move(testEventRecorders)));
 }
 
 const std::vector<std::shared_ptr<xUnitTest>> &TestCollection::Tests()