Skip to content
This repository was archived by the owner on Mar 26, 2020. It is now read-only.

Conversation

admsyn
Copy link
Contributor

@admsyn admsyn commented Aug 13, 2016

This PR adds a cmake option for the DR 1467 tests, as described in PR #71

That said, the test output seems to be the same regardless. This is the output after applying this PR, with an extra debug line printed in the relevant canary section of the tests

adam@adam-xps:~/workspace/json11/build$ cmake .. -- The CXX compiler identification is GNU 5.4.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /home/adam/workspace/json11/build adam@adam-xps:~/workspace/json11/build$ make Scanning dependencies of target json11 [ 25%] Building CXX object CMakeFiles/json11.dir/json11.cpp.o [ 50%] Linking CXX static library libjson11.a [ 50%] Built target json11 Scanning dependencies of target json11_test [ 75%] Building CXX object CMakeFiles/json11_test.dir/test.cpp.o [100%] Linking CXX executable json11_test [100%] Built target json11_test adam@adam-xps:~/workspace/json11/build$ ./json11_test k1: v1 k3: ["a", 123, true, false, null] - "a" - 123 - true - false - null Result: {"a": 1, "b": "text", "c": [1, 2, 3]} Result: {} Failed: malformed comment Failed: unexpected end of input inside inline comment Failed: unexpected end of input inside comment Failed: unexpected end of input inside multi-line comment obj: {"k1": "v1", "k2": 42, "k3": ["a", 123, true, false, null]} -- performing canary test for DR1467 {"key1": "value1", "key2": false, "key3": [1, 2, 3]} [[1, 2], [10, 20], [100, 200]] adam@adam-xps:~/workspace/json11/build$ cmake -D JSON11_ENABLE_DR1467_CANARY=off .. -- Configuring done -- Generating done -- Build files have been written to: /home/adam/workspace/json11/build adam@adam-xps:~/workspace/json11/build$ make [ 25%] Building CXX object CMakeFiles/json11.dir/json11.cpp.o [ 50%] Linking CXX static library libjson11.a [ 50%] Built target json11 [ 75%] Building CXX object CMakeFiles/json11_test.dir/test.cpp.o [100%] Linking CXX executable json11_test [100%] Built target json11_test adam@adam-xps:~/workspace/json11/build$ ./json11_test k1: v1 k3: ["a", 123, true, false, null] - "a" - 123 - true - false - null Result: {"a": 1, "b": "text", "c": [1, 2, 3]} Result: {} Failed: malformed comment Failed: unexpected end of input inside inline comment Failed: unexpected end of input inside comment Failed: unexpected end of input inside multi-line comment obj: {"k1": "v1", "k2": 42, "k3": ["a", 123, true, false, null]} -- NOT performing canary test for DR1467 {"key1": "value1", "key2": false, "key3": [1, 2, 3]} [[1, 2], [10, 20], [100, 200]] 
@smarx
Copy link

smarx commented Aug 13, 2016

Automated message from Dropbox CLA bot

@admsyn, thanks for the pull request! It looks like you haven't yet signed the Dropbox CLA. Please sign it here.

@admsyn admsyn changed the title Add cmake option for dr1467 canary tests Add cmake option for DR1467 canary tests Aug 13, 2016
@artwyman
Copy link
Contributor

The test output should be the same in either case. The difference should be that with the canary enabled, you should see an assertion failure on compilers which have the new/broken behavior. Your test run above seems to suggest that you didn't see that, though you mentioned seeing it in prior PR #71. Can you clarify?

@artwyman
Copy link
Contributor

I'm about to change the default to disabling the canary, so this should probably do the same if it's going to land.

Copy link
Contributor

@artwyman artwyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default should change to OFF now, to match recent changs in the code. Also you'll need to sign the CLA before I can merge this.

@admsyn admsyn force-pushed the feature-cmake-dr1467-canary branch from d4ed481 to 6de8cac Compare December 28, 2016 02:28
@admsyn
Copy link
Contributor Author

admsyn commented Dec 28, 2016

Let me know if you want any more changes

@artwyman
Copy link
Contributor

Ah, sorry, I made the same mistake as last time, of looking only at the individual CLA spreadsheet, not the company one. You're all set.

@artwyman artwyman merged commit a501d06 into dropbox:master Dec 28, 2016
@admsyn admsyn deleted the feature-cmake-dr1467-canary branch December 28, 2016 02:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

3 participants