From 3c431f8a8eab25cdb1237f6a4e3ef6ac3f2b7479 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 18 Jan 2015 21:38:02 +0100 Subject: Implemented `Reverse` function in terms of `Fold` --- test.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test.cc') diff --git a/test.cc b/test.cc index 6b9dffb..655aed3 100644 --- a/test.cc +++ b/test.cc @@ -99,6 +99,11 @@ TEST_F(TypeAsValueTest, ListMap) { EXPECT_TRUE(( std::is_same, tav::Int<8>, tav::Int<12>>::type, tav::Map, tav::Int<2>, tav::Int<3>>::type>::type>::value )); } +TEST_F(TypeAsValueTest, ListReverse) { + // (reverse (list 1 2 3)) + EXPECT_TRUE(( std::is_same, tav::Int<2>, tav::Int<1>>::type, tav::Reverse, tav::Int<2>, tav::Int<3>>::type>::type>::value )); +} + int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); -- cgit v1.2.3