Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
json-schema-validator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IOPSYS
json-schema-validator
Commits
f120a612
Commit
f120a612
authored
5 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
minor cleanup of test file
parent
e6eca16b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/schema_test.c
+3
-10
3 additions, 10 deletions
test/schema_test.c
with
3 additions
and
10 deletions
test/schema_test.c
+
3
−
10
View file @
f120a612
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include
<json-editor.h>
#include
<json-editor.h>
#include
"json-validator.h"
#include
"json-validator.h"
//#include "schema.h"
int
cp
(
const
char
*
to
,
const
char
*
from
)
int
cp
(
const
char
*
to
,
const
char
*
from
)
{
{
...
@@ -65,17 +65,12 @@ out_error:
...
@@ -65,17 +65,12 @@ out_error:
return
-
1
;
return
-
1
;
}
}
/* A test case that does nothing and succeeds. */
static
void
null_test_success
(
void
**
state
)
{
(
void
)
state
;
/* unused */
}
static
void
test_parse_invalid_schema
(
void
**
state
)
static
void
test_parse_invalid_schema
(
void
**
state
)
{
{
(
void
)
state
;
/* unused */
(
void
)
state
;
/* unused */
/* no asserts, just check memory managment */
/* invalid json */
/* invalid json */
cp
(
"/usr/share/rpcd/schemas/invalid.json"
,
"/opt/work/test/files/invalid_schemas/incomplete.json"
);
cp
(
"/usr/share/rpcd/schemas/invalid.json"
,
"/opt/work/test/files/invalid_schemas/incomplete.json"
);
schema_validator_init
();
schema_validator_init
();
...
@@ -204,7 +199,6 @@ static void test_validate_input_document_blob(void **state)
...
@@ -204,7 +199,6 @@ static void test_validate_input_document_blob(void **state)
schema_validator_destroy
();
schema_validator_destroy
();
}
}
static
void
test_validate_output_document_blob
(
void
**
state
)
static
void
test_validate_output_document_blob
(
void
**
state
)
{
{
(
void
*
)
state
;
(
void
*
)
state
;
...
@@ -241,7 +235,6 @@ static int create_teardown(void** state) {
...
@@ -241,7 +235,6 @@ static int create_teardown(void** state) {
return
0
;
return
0
;
}
}
int
main
(
void
)
{
int
main
(
void
)
{
const
struct
CMUnitTest
tests
[]
=
{
const
struct
CMUnitTest
tests
[]
=
{
cmocka_unit_test
(
test_validator_create_nothing
),
cmocka_unit_test
(
test_validator_create_nothing
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment