From 41b63eff7f76e6574ef238f821dad0212a619c2a Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 22 Feb 2015 17:14:15 +0100 Subject: Improved `simulate` function of the Turing machine example * introduced `state::state_accessor` helper function and moved position logic into `updatePosition` * added `IsEqual` comparator and expressed other basic comparators in terms of itself --- test.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test.cc') diff --git a/test.cc b/test.cc index 774f9be..44c0f6f 100644 --- a/test.cc +++ b/test.cc @@ -30,6 +30,28 @@ int main(int, char **) { } // equality +static_assert( + std::is_same< + tav::Boolean, + tav::IsEqual< + tav::Pair, tav::Int<2>>, + tav::Pair, tav::Int<2>> + > + >::value, + "(IsEqual '(1 . 2) '(1 . 2)) != #t" +); + +static_assert( + std::is_same< + tav::Boolean, + tav::IsEqual< + tav::Pair, tav::Int<2>>, + tav::Pair, tav::Int<3>> + > + >::value, + "(IsEqual '(1 . 2) '(2 . 3)) != #f" +); + static_assert( std::is_same< tav::Boolean, -- cgit v1.2.3