Skip to content

Commit

Permalink
update r841
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed May 13, 2015
1 parent a158f18 commit 1ae720e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -64,7 +64,7 @@ env:

matrix:
- STDFLAG=-std=c++98
- STDFLAG=-std=c++0x
- STDFLAG=-std=c++11

allow_failures:
- COVERITY_SCAN=1
Expand Down
13 changes: 12 additions & 1 deletion test/iutest_syntax_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -420,6 +420,17 @@ IUTEST(SyntaxTest, Matcher)
IUTEST_EXPECT_THAT(z, ::iutest::TypedEq<int>(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));
Expand Down
6 changes: 6 additions & 0 deletions tools/wandbox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1ae720e

Please sign in to comment.