Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
5773e164
Unverified
Commit
5773e164
authored
Feb 28, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fixed a linter warning
parent
1f3d2a3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
.gitignore
.gitignore
+1
-0
Makefile
Makefile
+6
-0
test/src/unit-readme.cpp
test/src/unit-readme.cpp
+6
-0
No files found.
.gitignore
View file @
5773e164
...
...
@@ -10,6 +10,7 @@ fuzz-testing
build
build_coverage
clang_analyze_build
doc/xml
doc/html
...
...
Makefile
View file @
5773e164
...
...
@@ -258,6 +258,12 @@ fuzzing-stop:
cppcheck
:
cppcheck
--enable
=
warning
--inconclusive
--force
--std
=
c++11
$(AMALGAMATED_FILE)
--error-exitcode
=
1
# compile and check with Clang Static Analyzer
clang_analyze
:
rm
-fr
clang_analyze_build
mkdir
clang_analyze_build
cd
clang_analyze_build
;
CCC_CXX
=
/Users/niels/Documents/projects/llvm-clang/local/bin/clang++ /Users/niels/Documents/projects/llvm-clang/local/bin/scan-build cmake ..
/Users/niels/Documents/projects/llvm-clang/local/bin/scan-build
-enable-checker
alpha.core.DynamicTypeChecker,alpha.core.PointerArithm,alpha.core.PointerSub,alpha.cplusplus.DeleteWithNonVirtualDtor,alpha.cplusplus.IteratorRange,alpha.cplusplus.MisusedMovedObject,alpha.security.ArrayBoundV2,alpha.core.Conversion
--use-c
++
=
/Users/niels/Documents/projects/llvm-clang/local/bin/clang++
--view
-analyze-headers
-o
clang_analyze_build/report.html make
-j10
-C
clang_analyze_build
##########################################################################
# maintainer targets
...
...
test/src/unit-readme.cpp
View file @
5773e164
...
...
@@ -168,6 +168,7 @@ TEST_CASE("README", "[hide]")
const
std
::
string
tmp
=
j
[
0
];
j
[
1
]
=
42
;
bool
foo
=
j
.
at
(
2
);
CHECK
(
foo
==
true
);
// other stuff
j
.
size
();
// 3 entries
...
...
@@ -177,6 +178,7 @@ TEST_CASE("README", "[hide]")
// comparison
bool
x
=
(
j
==
"[
\"
foo
\"
, 1, true]"
_json
);
// true
CHECK
(
x
==
true
);
// create an object
json
o
;
...
...
@@ -257,17 +259,21 @@ TEST_CASE("README", "[hide]")
bool
b1
=
true
;
json
jb
=
b1
;
bool
b2
=
jb
;
CHECK
(
b2
==
true
);
// numbers
int
i
=
42
;
json
jn
=
i
;
double
f
=
jn
;
CHECK
(
f
==
42
);
// etc.
std
::
string
vs
=
js
.
get
<
std
::
string
>
();
bool
vb
=
jb
.
get
<
bool
>
();
CHECK
(
vb
==
true
);
int
vi
=
jn
.
get
<
int
>
();
CHECK
(
vi
==
42
);
// etc.
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment