TestIO: Use std::strcmp() to compare strings instead of std::string()

This commit is contained in:
Daniel Marjamäki 2016-01-13 19:04:30 +01:00
parent dd3dd397b5
commit 9c8ff5b89c
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@
#include "checkio.h" #include "checkio.h"
#include "testsuite.h" #include "testsuite.h"
#include "tokenize.h" #include "tokenize.h"
#include <cstring>
class TestIO : public TestFixture { class TestIO : public TestFixture {
public: public:
@ -728,7 +728,7 @@ private:
? "[test.cpp:1]: (warning) " FORMAT " in format string (no. 1) requires '" FORMATSTR " *' but the argument type is '" TYPE " *'.\n" \ ? "[test.cpp:1]: (warning) " FORMAT " in format string (no. 1) requires '" FORMATSTR " *' but the argument type is '" TYPE " *'.\n" \
: "") : "")
#define TEST_SCANF_ERR_AKA(FORMAT,FORMATSTR,TYPE,AKATYPE) \ #define TEST_SCANF_ERR_AKA(FORMAT,FORMATSTR,TYPE,AKATYPE) \
((std::string(FORMATSTR) != std::string(TYPE) && std::string("std::" FORMATSTR) != std::string(TYPE)) \ ((std::strcmp(FORMATSTR,TYPE)!=0 && std::strcmp("std::" FORMATSTR,TYPE)!=0) \
? "[test.cpp:1]: (warning) " FORMAT " in format string (no. 1) requires '" FORMATSTR " *' but the argument type is '" TYPE " * {aka " AKATYPE " *}'.\n" \ ? "[test.cpp:1]: (warning) " FORMAT " in format string (no. 1) requires '" FORMATSTR " *' but the argument type is '" TYPE " * {aka " AKATYPE " *}'.\n" \
: "") : "")