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 1
1
CXXFLAGS =$(BASE_CXXFLAGS ) -I"$(CASABLANCA_INCLUDE_DIR ) " -I$(CASABLANCA_TESTS_DIR ) /Common/UnitTestpp/
2
2
LDFLAGS =-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
4
4
5
5
OUTPUT_DIR? =./$(MODE )
6
6
Original file line number Diff line number Diff line change 1
- /* **
1
+ /* **
2
2
* ==++==
3
3
*
4
4
* Copyright (c) Microsoft Corporation. All rights reserved.
24
24
****/
25
25
26
26
#include " stdafx.h"
27
+
28
+ #if defined(_MS_WINDOWS) || defined(__APPLE__)
27
29
#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
28
34
29
35
using namespace web ; using namespace utility ;
30
36
using namespace utility ::conversions;
@@ -33,8 +39,14 @@ namespace tests { namespace functional { namespace json_tests {
33
39
34
40
inline bool verify_parsing_error_msg (const std::string &str)
35
41
{
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);
37
45
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
38
50
}
39
51
40
52
#pragma warning (disable: 4127) // const expression
You can’t perform that action at this time.
0 commit comments