From de1189ebdc3a80bec19fda7b1892f16004207045 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 5 Dec 2014 22:19:52 +0000 Subject: Add a late explicit test that interfaces aren't counted --- slicer/test/interfaces.ice | 8 ++++++++ slicer/test/preprocessor.cpp | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 slicer/test/interfaces.ice diff --git a/slicer/test/interfaces.ice b/slicer/test/interfaces.ice new file mode 100644 index 0000000..499ff67 --- /dev/null +++ b/slicer/test/interfaces.ice @@ -0,0 +1,8 @@ +// This only contains interfaces, which don't get counted + +module Interfaces { + interface DontCountMe { + + }; +}; + diff --git a/slicer/test/preprocessor.cpp b/slicer/test/preprocessor.cpp index 430efd9..49c5c88 100644 --- a/slicer/test/preprocessor.cpp +++ b/slicer/test/preprocessor.cpp @@ -40,6 +40,12 @@ BOOST_AUTO_TEST_CASE( slicer_test_counts_nullfilestar ) BOOST_REQUIRE_EQUAL(COMPONENTS_IN_TEST_ICE, count); } +BOOST_AUTO_TEST_CASE( slicer_test_counts_interfacesOnly ) +{ + auto count = Slicer::Slicer::Apply(root / "interfaces.ice", NULL); + BOOST_REQUIRE_EQUAL(0, count); +} + BOOST_AUTO_TEST_CASE( slicer_test_ice ) { const fs::path cpp = fs::change_extension(tmp / base, ".cpp"); -- cgit v1.2.3