[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2a926d9 2/3: Test idempotence of canonicaliza
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2a926d9 2/3: Test idempotence of canonicalization |
Date: |
Mon, 27 Feb 2017 20:28:50 -0500 (EST) |
branch: master
commit 2a926d9e98f536203dc394f2e81700f3e44da56a
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Test idempotence of canonicalization
---
input_sequence_test.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/input_sequence_test.cpp b/input_sequence_test.cpp
index c884712..b966f78 100644
--- a/input_sequence_test.cpp
+++ b/input_sequence_test.cpp
@@ -108,7 +108,18 @@ void input_sequence_test::check
std::cout << std::endl;
}
- INVOKE_BOOST_TEST(bv && bs && bf, file, line);
+ InputSequence const idempotence_test(f, n, 90, 95, 0, 2002, k, o, w);
+ std::string const& h = idempotence_test.canonical_form();
+ bool const bh = h == f;
+ if(!bh)
+ {
+ std::cout << "\nExpression: '" << e << "'";
+ std::cout << "\n c14n(c14n): '" << h << "'";
+ std::cout << "\n differs from c14n: '" << f << "'";
+ std::cout << std::endl;
+ }
+
+ INVOKE_BOOST_TEST(bv && bs && bf && bh, file, line);
}
catch(std::exception const& x)
{