Commit graph

1725 commits

Author SHA1 Message Date
Niels
32f6682177 another try 2016-06-07 07:25:11 +02:00
Niels
f4ae8f8e2e another try 2016-06-07 07:21:17 +02:00
Niels
e772f06f0d another try 2016-06-07 07:14:54 +02:00
Niels
5173c16222 another try 2016-06-07 07:07:42 +02:00
Niels
744bae7fc4 trying to fix Travis 2016-06-07 07:00:31 +02:00
Niels
9e2dfd19e8 minor cleanup 2016-06-07 00:20:53 +02:00
Niels
b508d1f1c4 fix proposal for #260 2016-06-06 18:50:39 +02:00
Niels
04e1e7b586 cleanup 2016-05-29 14:56:08 +02:00
Niels
aa8aa3ba9f overworked coverity stuffy 2016-05-29 14:06:43 +02:00
Niels
6bdb883b5c ignore build errors for coverity-scan 2016-05-29 13:32:36 +02:00
Niels
c0b2c6ea5d removing beta-xcode6.3 for now 2016-05-29 13:06:27 +02:00
Niels
6fed416125 fixed used compiler 2016-05-29 12:57:09 +02:00
Niels
b26582c0e9 another try for coverity-scan 2016-05-29 12:29:46 +02:00
Niels
1cc77a5fe5 another try for coverity-scan 2016-05-29 12:15:13 +02:00
Niels
91dfc723be added coverity_scan 2016-05-29 12:07:20 +02:00
Niels
7bdfde4493 added a note about different NDKs (see #219) 2016-05-28 16:06:41 +02:00
Niels
71a7746ccb removed a line 2016-05-25 21:55:03 +02:00
Niels
a3f432b3dd added hint to Homebrew 2016-05-18 22:23:35 +02:00
Niels
25d60b7bab Merge pull request #247 from robertmrk/feature/cmake-cleanup
Define CMake/CTest tests
2016-05-18 22:20:45 +02:00
Niels
837617122a fixed #246 2016-05-18 22:17:08 +02:00
Robert Marki
639d63217e Define CMake/CTest tests
Instead of copying the test executable and the JSON files used by
the tests at install time, define CMake/CTest tests for running
the json_unit executable from any build directory with the project's
source directory as its working directory.

- call enable_testing in the main lists file to allow the definition
of tests
- remove install commands from the test directory's lists file
- define two tests
  - json_unit_default for running the default tests by executing
json_unit without any arguments
  - json_unit_all for running all the tests by executing json_unit
with the "*" argument
- update the AppVeyor configuration file to use the new testing method
2016-05-18 11:53:49 +02:00
Niels
0a393b8374 indentation cleanup 2016-05-12 07:34:36 +02:00
Niels
0e0ecb2c14 fixed a warning and update ChangeLog 2016-05-12 00:32:18 +02:00
Niels
fb06356856 thanks 2016-05-11 20:58:11 +02:00
Niels
888d022573 Merge pull request #242 from ChrisKitching/outOfTree
Out of tree builds and a few other miscellaneous CMake cleanups.
2016-05-11 20:52:45 +02:00
Niels
f1e61896fb fixed a shadow error 2016-05-11 18:43:12 +02:00
Niels
db5c9ec9ba fixed issue #239 (-Wconversion warnings) 2016-05-11 17:25:59 +02:00
Niels
91aa4c9def Merge branch 'develop' into feature/issue239 2016-05-11 17:23:01 +02:00
Chris Kitching
0e2f0c4edc
Repair appveyor... Horrifyingly
It's sort of gnarly that it's still doing in-tree builds, but I
really, _really_ don't want to get any more friendly with CMake's
Visual Studio generator to work out how to make it stop doing it.

In-tree builds still work, after all, and the goal of this work is
to make out-of-tree builds work as well. Notional horrors like
this will have to wait ;)
2016-05-11 14:02:53 +01:00
Chris Kitching
527a69bb64
Install the test binary and test data. Fixes #241
The resulting install tree, when tests are enabled, looks like this:

```
.
├── cmake
│   ├── nlohmann_jsonConfig.cmake
│   ├── nlohmann_jsonConfigVersion.cmake
│   └── nlohmann_jsonTargets.cmake
├── include
│   └── nlohmann
│       └── json.hpp
└── test
    ├── bin
    │   └── json_unit
    └── data
        ├── json_nlohmann_tests
        │   ├── all_unicode.json
        │   └── bom.json
        ├── json.org
        │   ├── 1.json
        │   ├── ...
        ├── json_roundtrip
        │   ├── roundtrip01.json
        │   ├── roundtrip02.json
        │   └── ...
        ├── json_tests
        │   ├── fail10.json
        │   └── ...
        └── json_testsuite
            └── sample.json
```

It has the property that you can invoke the test binary from the
root of the install tree and the tests work correctly (you no
longer depend on the test binary being run inside the source
tree).

If tests are disabled, the entire `test/` subtree is omitted.
Notice how that yields exactly what you want for using this
library in other projects.

I do not believe I need to update travis due to this change, as the
evil Makefile continues to do in-tree builds. I expect I'll find
out soon enough.
2016-05-11 01:43:42 +01:00
Chris Kitching
af76508fe7
Introduce structure to the test/ directory
This introduces a clear separation between test data and test
binaries. Test data is moved into test/data, and the test binaries
move into test/src. A new CMake script specific to building the
tests is introduced in /test to slightly clean up the toplevel
one.

As well as tidying things up, this makes the next step trivial...
2016-05-11 01:30:08 +01:00
Chris Kitching
4e6aacda36
Use definitely-unique target/project name
There exist lots of json libraries, and project/target names must
be globally unique. If someone integrated with this library in a
particularly stupid way, using a generic name like "json" might
cause a problem.
2016-05-11 01:14:56 +01:00
Chris Kitching
b6becce8fb
Don't use variable for the test target name
I'm not sure that using a variable for target names really helps
with clarity. Unlike paths, target names aren't really something
you change. In a sense, targets are themselves a sort of variable,
so having a variable to name a variable seems just a bit gnarly.
2016-05-11 01:12:56 +01:00
Chris Kitching
bf7b6d15c7
Unset execute bit on sample.json 2016-05-11 01:10:29 +01:00
Chris Kitching
6a98a6c964
Add CMake option to disable building the tests (Default builds) 2016-05-11 01:06:32 +01:00
Niels
9ecf83f630 working on #235 2016-05-08 20:28:20 +02:00
Niels
6d8e00ade8 another try to remove a warning 2016-05-08 17:17:17 +02:00
Niels
ac3036dc0f Merge branch 'develop' into feature/issue239 2016-05-08 17:07:08 +02:00
Niels
fadf286653 added test case for std::bad_alloc 2016-05-08 14:35:32 +02:00
Niels
85a30813c8 removed unnecessary code (numbers must not begin with "+") 2016-05-07 20:22:58 +02:00
Niels
688cd49bdc Merge branch 'feature/json-patch' into develop 2016-05-07 18:41:02 +02:00
Niels
c04275966f improved test coverage 2016-05-07 18:33:43 +02:00
Niels
9073b2ca39 hopefully removed some warnings 2016-04-30 16:22:27 +02:00
Niels
ea84a85b13 simplified flatten/unflatten examples 2016-04-30 10:39:03 +02:00
Niels
a21f8b0c77 added AppVeyor information 2016-04-30 01:21:35 +02:00
Niels
9170740f45 added documentation on Travis compilers 2016-04-30 01:01:41 +02:00
Niels
7c04bc3db6 added name call 2016-04-30 00:43:33 +02:00
Niels
be16d005e4 get compiler versions 2016-04-30 00:25:11 +02:00
Niels
f4ecceab19 cleanup 2016-04-30 00:12:19 +02:00
Niels
1d3b4dd158 added test cases 2016-04-30 00:03:47 +02:00