diff options
author | Adrian Kummerlaender | 2015-02-22 17:14:15 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-02-22 17:14:15 +0100 |
commit | 41b63eff7f76e6574ef238f821dad0212a619c2a (patch) | |
tree | 291652f853e32c80183fd1178d470c5499eee1c5 /test.cc | |
parent | 18fe83991563c0072fabaa60ff161e781a5364c2 (diff) | |
download | TypeAsValue-41b63eff7f76e6574ef238f821dad0212a619c2a.tar TypeAsValue-41b63eff7f76e6574ef238f821dad0212a619c2a.tar.gz TypeAsValue-41b63eff7f76e6574ef238f821dad0212a619c2a.tar.bz2 TypeAsValue-41b63eff7f76e6574ef238f821dad0212a619c2a.tar.lz TypeAsValue-41b63eff7f76e6574ef238f821dad0212a619c2a.tar.xz TypeAsValue-41b63eff7f76e6574ef238f821dad0212a619c2a.tar.zst TypeAsValue-41b63eff7f76e6574ef238f821dad0212a619c2a.zip |
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
Diffstat (limited to 'test.cc')
-rw-r--r-- | test.cc | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -33,6 +33,28 @@ int main(int, char **) { } static_assert( std::is_same< tav::Boolean<true>, + tav::IsEqual< + tav::Pair<tav::Int<1>, tav::Int<2>>, + tav::Pair<tav::Int<1>, tav::Int<2>> + > + >::value, + "(IsEqual '(1 . 2) '(1 . 2)) != #t" +); + +static_assert( + std::is_same< + tav::Boolean<false>, + tav::IsEqual< + tav::Pair<tav::Int<1>, tav::Int<2>>, + tav::Pair<tav::Int<2>, tav::Int<3>> + > + >::value, + "(IsEqual '(1 . 2) '(2 . 3)) != #f" +); + +static_assert( + std::is_same< + tav::Boolean<true>, tav::IsEqualType<tav::Int<1>, tav::Int<2>> >::value, "(IsEqualType 1 2) != #t" |