Fix test syntax errors

This commit is contained in:
Danny Robson 2011-07-29 17:56:26 +10:00
parent 1fc1dd4134
commit 4091a5874d
2 changed files with 19 additions and 19 deletions

View File

@ -8,24 +8,24 @@ using namespace std;
int int
main (int, char **) { main (int, char **) {
check_hard ( range<double>::UNIT.includes ( 0.0)); check_hard ( range<double>::UNIT.contains ( 0.0));
check_hard ( range<double>::UNIT.includes ( 0.5)); check_hard ( range<double>::UNIT.contains ( 0.5));
check_hard ( range<double>::UNIT.includes ( 1.0)); check_hard ( range<double>::UNIT.contains ( 1.0));
check_hard (!range<double>::UNIT.includes (-0.00001)); check_hard (!range<double>::UNIT.contains (-0.00001));
check_hard (!range<double>::UNIT.includes ( 1.00001)); check_hard (!range<double>::UNIT.contains ( 1.00001));
check_hard ( range<uint16_t>::UNIT.includes (0)); check_hard ( range<uint16_t>::UNIT.contains (0));
check_hard ( range<uint16_t>::UNIT.includes (1)); check_hard ( range<uint16_t>::UNIT.contains (1));
check_hard (!range<uint16_t>::UNIT.includes (2)); check_hard (!range<uint16_t>::UNIT.contains (2));
check_hard (!range<uint16_t>::UNIT.includes (numeric_limits <uint16_t>::max ())); check_hard (!range<uint16_t>::UNIT.contains (numeric_limits <uint16_t>::max ()));
check_hard ( range<double>::UNLIMITED.includes (0.0)); check_hard ( range<double>::UNLIMITED.contains (0.0));
check_hard ( range<double>::UNLIMITED.includes (+numeric_limits<double>::infinity ())); check_hard ( range<double>::UNLIMITED.contains (+numeric_limits<double>::infinity ()));
check_hard ( range<double>::UNLIMITED.includes (-numeric_limits<double>::infinity ())); check_hard ( range<double>::UNLIMITED.contains (-numeric_limits<double>::infinity ()));
check_hard (!range<double>::UNLIMITED.includes ( numeric_limits<double>::quiet_NaN ())); check_hard (!range<double>::UNLIMITED.contains ( numeric_limits<double>::quiet_NaN ()));
check_hard ( range<uint16_t>::UNLIMITED.includes (numeric_limits<uint16_t>::min())); check_hard ( range<uint16_t>::UNLIMITED.contains (numeric_limits<uint16_t>::min()));
check_hard ( range<uint16_t>::UNLIMITED.includes (numeric_limits<uint16_t>::max())); check_hard ( range<uint16_t>::UNLIMITED.contains (numeric_limits<uint16_t>::max()));
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }

View File

@ -10,7 +10,7 @@ increment_uint (unsigned int &val)
void void
test_null (void) { test_null (void) {
signal<void> void_signal; util::signal<void> void_signal;
void_signal (); void_signal ();
} }
@ -18,7 +18,7 @@ test_null (void) {
void void
test_single (void) { test_single (void) {
unsigned int val = 0; unsigned int val = 0;
signal<void, unsigned int&> void_signal; util::signal<void, unsigned int&> void_signal;
void_signal.connect (increment_uint); void_signal.connect (increment_uint);
void_signal (val); void_signal (val);
@ -30,7 +30,7 @@ test_single (void) {
void void
test_double (void) { test_double (void) {
unsigned int val = 0; unsigned int val = 0;
signal<void, unsigned int&> void_signal; util::signal<void, unsigned int&> void_signal;
void_signal.connect (increment_uint); void_signal.connect (increment_uint);
void_signal.connect (increment_uint); void_signal.connect (increment_uint);
@ -42,7 +42,7 @@ test_double (void) {
void void
test_linking_pointers (void) { test_linking_pointers (void) {
signal<void, const char*> ptr_signal; util::signal<void, const char*> ptr_signal;
ptr_signal (NULL); ptr_signal (NULL);
} }