From 2f24d3f2611d5225dbfd655826f601d73d07752f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?= Date: Wed, 22 May 2002 19:48:02 +0000 Subject: [PATCH] added tests for empty case statements [SVN r14015] --- test/switch_construct.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/switch_construct.cpp b/test/switch_construct.cpp index 4e3357b..acb5ed2 100644 --- a/test/switch_construct.cpp +++ b/test/switch_construct.cpp @@ -351,11 +351,30 @@ void do_switch_yes_defaults_tests() { } +void test_empty_cases() { + + using namespace boost::lambda; + + // --- + switch_statement( + _1, + default_statement() + )(make_const(1)); + + switch_statement( + _1, + case_statement<1>() + )(make_const(1)); + +} + int test_main(int, char* []) { do_switch_no_defaults_tests(); do_switch_yes_defaults_tests(); + test_empty_cases(); + return EXIT_SUCCESS; }