Fixed a bug that caused the testname to not be printed.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
/// Josh Unit Test Library
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -15,7 +17,7 @@ namespace jtest {
|
||||
// -maxine
|
||||
struct testdef
|
||||
{
|
||||
const std::string& testname;
|
||||
std::string testname;
|
||||
const std::function<void()>& callback;
|
||||
const std::string file; // <- & is not needed here -maxine
|
||||
int line;
|
||||
@@ -105,4 +107,5 @@ namespace jtest {
|
||||
//#define TEST(a, b) jtest::test(a, b, __FILE__, __LINE__);
|
||||
// Same definition as before essentially, but points to a different function which adds the test to the global vector.
|
||||
// -maxine
|
||||
|
||||
#define TEST(a, b) jtest::definetest(a, b, __FILE__, __LINE__);
|
||||
|
Reference in New Issue
Block a user