File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66// License: BSD
77// ----------------------------------------------------------------------------------
88
9+ // Disable warnings from template instantiations in header files
10+ #ifdef __GNUC__
11+ #pragma GCC diagnostic push
12+ #pragma GCC diagnostic ignored "-Wunused-parameter"
13+ #pragma GCC diagnostic ignored "-Wnonnull"
14+ #endif
15+
916#include " xnode.h"
1017#include " xarray.h"
1118#include < iostream>
2532#include " cunit.h"
2633#include " xobject.h"
2734
35+ // Restore warnings after includes
36+ #ifdef __GNUC__
37+ #pragma GCC diagnostic pop
38+ #endif
39+
2840using namespace std ;
2941
3042void TestArraySum () {
Original file line number Diff line number Diff line change 66// License: BSD
77// ----------------------------------------------------------------------------------
88
9+ // Disable warnings from template instantiations in header files
10+ #ifdef __GNUC__
11+ #pragma GCC diagnostic push
12+ #pragma GCC diagnostic ignored "-Wunused-parameter"
13+ #pragma GCC diagnostic ignored "-Wunused-variable"
14+ #pragma GCC diagnostic ignored "-Wnonnull"
15+ #endif
16+
917#include " xnode.h"
1018#include < iostream>
1119
1826#include < limits>
1927#include < cmath>
2028
29+ // Restore warnings after includes
30+ #ifdef __GNUC__
31+ #pragma GCC diagnostic pop
32+ #endif
33+
2134using namespace std ;
2235
2336// Helper function to log the conversion being tested
Original file line number Diff line number Diff line change 66// License: BSD
77// ----------------------------------------------------------------------------------
88
9+ // Disable warnings from template instantiations in header files
10+ #ifdef __GNUC__
11+ #pragma GCC diagnostic push
12+ #pragma GCC diagnostic ignored "-Wunused-parameter"
13+ #pragma GCC diagnostic ignored "-Wunused-variable"
14+ #pragma GCC diagnostic ignored "-Wnonnull"
15+ #endif
16+
917#include " xnode.h"
1018#include < iostream>
1119#include < limits>
1624#include " cunit.h"
1725#include " xarray.h"
1826
27+ // Restore warnings after includes
28+ #ifdef __GNUC__
29+ #pragma GCC diagnostic pop
30+ #endif
31+
1932using namespace std ;
2033
2134// Helper function to log the test being executed
Original file line number Diff line number Diff line change 77// License: BSD
88// ----------------------------------------------------------------------------------
99
10+ // Disable warnings from template instantiations in header files
11+ #ifdef __GNUC__
12+ #pragma GCC diagnostic push
13+ #pragma GCC diagnostic ignored "-Wunused-parameter"
14+ #pragma GCC diagnostic ignored "-Wunused-variable"
15+ #pragma GCC diagnostic ignored "-Wnonnull"
16+ #endif
17+
1018#include " xnode.h"
1119#include < iostream>
1220
1927#include " cunit.h"
2028#include " xnode_long_double.h"
2129
30+ // Restore warnings after includes
31+ #ifdef __GNUC__
32+ #pragma GCC diagnostic pop
33+ #endif
34+
2235using namespace std ;
2336
2437void TestDefCntr () {
Original file line number Diff line number Diff line change 66// License: BSD
77// ----------------------------------------------------------------------------------
88
9+ // Disable warnings from template instantiations in header files
10+ #ifdef __GNUC__
11+ #pragma GCC diagnostic push
12+ #pragma GCC diagnostic ignored "-Wunused-parameter"
13+ #pragma GCC diagnostic ignored "-Wunused-variable"
14+ #pragma GCC diagnostic ignored "-Wnonnull"
15+ #endif
16+
917#include " xnode.h"
1018#include " xarray.h"
1119#include " xobject.h"
1624
1725#include " cunit.h"
1826
27+ // Restore warnings after includes
28+ #ifdef __GNUC__
29+ #pragma GCC diagnostic pop
30+ #endif
31+
1932using namespace std ;
2033
2134void TestTreeOfNodesWithArray () {
Original file line number Diff line number Diff line change 66// License: BSD
77// ----------------------------------------------------------------------------------
88
9+ // Disable warnings from template instantiations in header files
10+ #ifdef __GNUC__
11+ #pragma GCC diagnostic push
12+ #pragma GCC diagnostic ignored "-Wunused-parameter"
13+ #pragma GCC diagnostic ignored "-Wunused-variable"
14+ #pragma GCC diagnostic ignored "-Wnonnull"
15+ #endif
16+
917#include " xnode.h"
1018#include < iostream>
1119#include " cunit.h"
1220#include < limits>
1321#include < cmath>
1422
23+ // Restore warnings after includes
24+ #ifdef __GNUC__
25+ #pragma GCC diagnostic pop
26+ #endif
27+
1528using namespace std ;
1629
1730// Test functions for each supported data type
@@ -272,14 +285,14 @@ void TestLongType() {
272285void TestLongLongType () {
273286 // Test scenario 1
274287 xnode node;
275- long long testValue = 1234567890123456789LL ;
288+ long long testValue = std::numeric_limits< long long >:: max () ;
276289 node.set_as <long long >(testValue);
277290
278291 AssertTrue (node.is <long long >(), " is<long long>() should return true" );
279292 AssertEquals (testValue, node.get_as <long long >(), " get_as<long long>() should return the test value" );
280293
281294 // Test with negative value
282- long long negValue = - 9876543210987654321LL ;
295+ long long negValue = std::numeric_limits< long long >:: min () ;
283296 node.set_as <long long >(negValue);
284297
285298 AssertTrue (node.is <long long >(), " is<long long>() should return true for negative value" );
Original file line number Diff line number Diff line change 66// License: BSD
77// ----------------------------------------------------------------------------------
88
9+ // Disable warnings from template instantiations in header files
10+ #ifdef __GNUC__
11+ #pragma GCC diagnostic push
12+ #pragma GCC diagnostic ignored "-Wunused-parameter"
13+ #pragma GCC diagnostic ignored "-Wunused-variable"
14+ #pragma GCC diagnostic ignored "-Wnonnull"
15+ #endif
16+
917#include " xnode.h"
1018#include " xobject.h"
1119#include < iostream>
1422
1523#include " cunit.h"
1624
25+ // Restore warnings after includes
26+ #ifdef __GNUC__
27+ #pragma GCC diagnostic pop
28+ #endif
29+
1730using namespace std ;
1831
1932void TestPropertyListPutGet () {
You can’t perform that action at this time.
0 commit comments