mirror of
https://github.com/nlohmann/json.git
synced 2026-07-05 10:05:10 +00:00
Adjust JSON Pointer examples (#3622)
* 📡 adjust JSON Pointer examples * 👷 add test for documentation * 📡 note platform-dependent output on some examples
This commit is contained in:
+6
-2
@@ -11,13 +11,13 @@ EXAMPLES = $(wildcard examples/*.cpp)
|
||||
|
||||
# create output from a stand-alone example file
|
||||
%.output: %.cpp
|
||||
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
||||
$(MAKE) $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
||||
./$(<:.cpp=) > $@
|
||||
rm $(<:.cpp=)
|
||||
|
||||
# compare created output with current output of the example files
|
||||
%.test: %.cpp
|
||||
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
||||
$(MAKE) $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
||||
./$(<:.cpp=) > $@
|
||||
diff $@ $(<:.cpp=.output)
|
||||
rm $(<:.cpp=) $@
|
||||
@@ -28,6 +28,10 @@ create_output: $(EXAMPLES:.cpp=.output)
|
||||
# check output of all stand-alone example files
|
||||
check_output: $(EXAMPLES:.cpp=.test)
|
||||
|
||||
# check output of all stand-alone example files (exclude files with platform-dependent output.)
|
||||
# This target is used in the CI (ci_test_documentation).
|
||||
check_output_portable: $(filter-out examples/meta.test examples/max_size.test examples/std_hash.test examples/basic_json__CompatibleType.test,$(EXAMPLES:.cpp=.test))
|
||||
|
||||
clean:
|
||||
rm -fr $(EXAMPLES:.cpp=)
|
||||
$(MAKE) clean -C docset
|
||||
|
||||
Reference in New Issue
Block a user