From 638ce4a7bd99ef1a602da0e2f0a45d9363124e33 Mon Sep 17 00:00:00 2001 From: Jean-Guillaume Dumas Date: Tue, 4 Jun 2019 18:07:22 +0200 Subject: [PATCH] test field initialization --- tests/test-regression.C | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/test-regression.C b/tests/test-regression.C index 86388bb7..515e3f76 100644 --- a/tests/test-regression.C +++ b/tests/test-regression.C @@ -42,15 +42,22 @@ bool testRationalDenom() { QQ.add(c,a,b); std::clog << "0: " << c << std::endl; pass = pass && isZero(c); - + + std::clog << "[TRD] " << (pass?"PASSED.":"FAILED.") << std::endl; return pass; - } - - +#include "givaro/modular.h" +bool testFieldInit() { + size_t p = 19; + Givaro::Modular F1(p); + // This is a compilation test, + // if it compiles, everything's fine + F1.write(std::clog << "[TFI] PASSED: ") << std::endl; + return true; +} int main(int argc, char ** argv) { @@ -64,7 +71,7 @@ int main(int argc, char ** argv) pass = pass && testRationalDenom (); - + pass = pass && testFieldInit (); return pass ? 0 : -1; }