aboutsummaryrefslogtreecommitdiff
path: root/tests/libntp/g_lfptest.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libntp/g_lfptest.h')
-rw-r--r--tests/libntp/g_lfptest.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/libntp/g_lfptest.h b/tests/libntp/g_lfptest.h
deleted file mode 100644
index 1daffef944d7..000000000000
--- a/tests/libntp/g_lfptest.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef NTP_TESTS_LFPTEST_H
-#define NTP_TESTS_LFPTEST_H
-
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_fp.h"
-};
-
-class lfptest : public libntptest {
-protected:
- ::testing::AssertionResult IsEqual(const l_fp &expected, const l_fp &actual) {
- if (L_ISEQU(&expected, &actual)) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << " expected: " << lfptoa(&expected, FRACTION_PREC)
- << " (" << expected.l_ui << "." << expected.l_uf << ")"
- << " but was: " << lfptoa(&actual, FRACTION_PREC)
- << " (" << actual.l_ui << "." << actual.l_uf << ")";
- }
- }
-
- static const int32 HALF = -2147483647L - 1L;
- static const int32 HALF_PROMILLE_UP = 2147484; // slightly more than 0.0005
- static const int32 HALF_PROMILLE_DOWN = 2147483; // slightly less than 0.0005
- static const int32 QUARTER = 1073741824L;
- static const int32 QUARTER_PROMILLE_APPRX = 1073742L;
-};
-
-#endif
-/* NTP_TESTS_LFPTEST_H */