evolutional / upptest Goto Github PK
View Code? Open in Web Editor NEWA minimalist unit test framework for C++11 presented as a single file
License: The Unlicense
A minimalist unit test framework for C++11 presented as a single file
License: The Unlicense
Compile dies upon include. Here are the clang++ results:
./upptest.h:97:15: error: exception specification of overriding function is more lax than base version
const char* what() const override { return _msg.c_str(); }
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception.h:75:5: note: overridden virtual function is here
what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
^
1 error generated.
g++ results:
In file included from play.cpp:5:
upptest.h:97:15: error: looser throw specifier for ‘virtual const char* utest::assert_fail_exception::what() const’
97 | const char* what() const override { return _msg.c_str(); }
| ^~~~
In file included from /usr/include/c++/9/exception:38,
from upptest.h:51,
from play.cpp:5:
/usr/include/c++/9/bits/exception.h:75:5: note: overridden function is ‘virtual const char* std::exception::what() const noexcept’
75 | what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
| ^~~~
In file included from play.cpp:5:
upptest.h:146:15: error: declaration of ‘const utest::info* utest::result::info’ changes meaning of ‘info’ [-fpermissive]
146 | const info* info;
| ^~~~
upptest.h:114:8: note: ‘info’ declared here as ‘class utest::info’
114 | class info;
| ^~~~
upptest.h:147:10: error: declaration of ‘utest::status utest::result::status’ changes meaning of ‘status’ [-fpermissive]
147 | status status;
| ^~~~~~
upptest.h:107:13: note: ‘status’ declared here as ‘enum class utest::status’
107 | enum class status
| ^~~~~~
The errors are the same for -std=c++11 with more that follow.
Cheers,
Joe
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.