From 1ae720e8371e799b6c6332494513c1737ba18c69 Mon Sep 17 00:00:00 2001 From: srz-zumix Date: Wed, 13 May 2015 19:18:41 +0900 Subject: [PATCH] update r841 --- .travis.yml | 10 +++++----- test/iutest_syntax_tests.cpp | 13 ++++++++++++- tools/wandbox/Makefile | 6 ++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3b605ed5c2..4f19c5360d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,10 +15,10 @@ before_install: install: # gcc 5.1 - - if [ "${USE_NEWEST_GCC}" = '1' ]; then sudo apt-get -qq install g++-5.1; fi - - if [ "${USE_NEWEST_GCC}" = '1' ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5.1 90; fi - - if [ "${USE_NEWEST_GCC}" = '1' ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5.1 90; fi - - if [ "${USE_NEWEST_GCC}" = '1' ]; then sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-5.1 90; fi + - if [ "${USE_NEWEST_GCC}" = '1' ]; then sudo apt-get -qq install g++-5; fi + - if [ "${USE_NEWEST_GCC}" = '1' ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 90; fi + - if [ "${USE_NEWEST_GCC}" = '1' ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90; fi + - if [ "${USE_NEWEST_GCC}" = '1' ]; then sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-5 90; fi # clang 3.5 #- if [ "${CXX}" = 'clang++' ]; then sudo apt-get -qq install clang-3.5; fi #- if [ "${CXX}" = 'clang++' ]; then export CXX="clang++-3.5"; fi @@ -64,7 +64,7 @@ env: matrix: - STDFLAG=-std=c++98 - - STDFLAG=-std=c++0x + - STDFLAG=-std=c++11 allow_failures: - COVERITY_SCAN=1 diff --git a/test/iutest_syntax_tests.cpp b/test/iutest_syntax_tests.cpp index 36fe812fe5..62b40b557e 100644 --- a/test/iutest_syntax_tests.cpp +++ b/test/iutest_syntax_tests.cpp @@ -6,7 +6,7 @@ * * @author t.shirayanagi * @par copyright - * Copyright (C) 2013-2014, Takazumi Shirayanagi\n + * Copyright (C) 2013-2015, Takazumi Shirayanagi\n * This software is released under the new BSD License, * see LICENSE */ @@ -420,6 +420,17 @@ IUTEST(SyntaxTest, Matcher) IUTEST_EXPECT_THAT(z, ::iutest::TypedEq(1.0)); } +#if IUTEST_HAS_MATCHER_REGEX +IUTEST(SyntaxTest, MatcherRegex) +{ + ::std::string s = "greeeeeen"; + IUTEST_EXPECT_THAT(s, ::iutest::MatchesRegex("gre+n")); + IUTEST_EXPECT_THAT("hogeeeeeet", ::iutest::MatchesRegex("hoge+t")); + IUTEST_EXPECT_THAT(s, ::iutest::ContainsRegex("e")); + IUTEST_EXPECT_THAT("hogeeeeeet", ::iutest::ContainsRegex("hoge+")); +} +#endif + IUTEST(SyntaxTest, MatcherPredicate) { IUTEST_EXPECT_TRUE(::iutest::Value(2, 2)); diff --git a/tools/wandbox/Makefile b/tools/wandbox/Makefile index dd44d45ef1..5ffbf1ea88 100644 --- a/tools/wandbox/Makefile +++ b/tools/wandbox/Makefile @@ -25,4 +25,10 @@ local: test: ../../test/iutest_syntax_tests.cpp Makefile python iuwandbox.py $< -c $(WANDBOX_COMPILER) -f"-DIUTEST_USE_MAIN" --expand_include --encoding utf-8-sig + +test-gcc: ../../test/iutest_syntax_tests.cpp Makefile + python iuwandbox.py $< -c gcc-head -f"-DIUTEST_USE_MAIN" -x "warning,gnu++1y" --expand_include --encoding utf-8-sig + +test-clang: ../../test/iutest_syntax_tests.cpp Makefile + python iuwandbox.py $< -c clang-head -f"-DIUTEST_USE_MAIN" -x "warning,gnu++1y" --expand_include --encoding utf-8-sig