File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Release/tests/Functional/json Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 11CXXFLAGS =$(BASE_CXXFLAGS ) -I"$(CASABLANCA_INCLUDE_DIR ) " -I$(CASABLANCA_TESTS_DIR ) /Common/UnitTestpp/
22LDFLAGS =-L"$(OUTPUT_DIR ) " $(BASE_LDFLAGS )
3- LDLIBS =-lcasablanca -lunittestpp -l$(BOOST_SYSTEM ) -l$(BOOST_THREAD ) -lpthread -lstdc++ -lm
3+ LDLIBS =-lcasablanca -lunittestpp -l$(BOOST_SYSTEM ) -l$(BOOST_THREAD ) -l $( BOOST_REGEX ) - lpthread -lstdc++ -lm
44
55OUTPUT_DIR? =./$(MODE )
66
Original file line number Diff line number Diff line change 1- /* **
1+ /* **
22* ==++==
33*
44* Copyright (c) Microsoft Corporation. All rights reserved.
2424****/
2525
2626#include " stdafx.h"
27+
28+ #if defined(_MS_WINDOWS) || defined(__APPLE__)
2729#include < regex>
30+ #else
31+ // GCC 4.8 doesn't support regex very well, fall back to Boost. Revist in GCC 4.9.
32+ #include < boost/regex.hpp>
33+ #endif
2834
2935using namespace web ; using namespace utility ;
3036using namespace utility ::conversions;
@@ -33,8 +39,14 @@ namespace tests { namespace functional { namespace json_tests {
3339
3440 inline bool verify_parsing_error_msg (const std::string &str)
3541 {
36- static std::regex pattern (" ^\\ * Line \\ d+, Column \\ d+ Syntax error: .+" );
42+ auto spattern = " ^\\ * Line \\ d+, Column \\ d+ Syntax error: .+" ;
43+ #if defined(_MS_WINDOWS) || defined(__APPLE__)
44+ static std::regex pattern (spattern);
3745 return std::regex_match (str, pattern, std::regex_constants::match_flag_type::match_not_null);
46+ #else
47+ static boost::regex pattern (spattern);
48+ return boost::regex_match (str, pattern, boost::regex_constants::match_flag_type::match_not_null);
49+ #endif
3850 }
3951
4052#pragma warning (disable: 4127) // const expression
You can’t perform that action at this time.
0 commit comments