]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
test_json: Fix test names with reserved words
authorGeorge Joseph <gjoseph@digium.com>
Tue, 30 May 2017 14:43:49 +0000 (08:43 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 30 May 2017 14:48:58 +0000 (09:48 -0500)
Some of the test names were actually reserved words (true, false,
int, null, string, bool).  When the jenkins test results analyzer
does its thing it tries to create a map using the test names as
keys and fails because they're reserved words.

Added "type_" to those test names.

Change-Id: I90d809f46969c78a1c605b736ff0635196a2cf1b

tests/test_json.c

index 7362a6127a132ef8d212cf9abf67e3efb6616295..19496b4bfd8d4f4e890ebddfa599cabced97064e 100644 (file)
@@ -100,7 +100,7 @@ AST_TEST_DEFINE(json_test_false)
 
        switch (cmd) {
        case TEST_INIT:
-               info->name = "false";
+               info->name = "type_false";
                info->category = CATEGORY;
                info->summary = "Testing fundamental JSON false value.";
                info->description = "Test JSON abstraction library.";
@@ -125,7 +125,7 @@ AST_TEST_DEFINE(json_test_true)
 
        switch (cmd) {
        case TEST_INIT:
-               info->name = "true";
+               info->name = "type_true";
                info->category = CATEGORY;
                info->summary = "Testing JSON true value.";
                info->description = "Test JSON abstraction library.";
@@ -150,7 +150,7 @@ AST_TEST_DEFINE(json_test_bool0)
 
        switch (cmd) {
        case TEST_INIT:
-               info->name = "bool0";
+               info->name = "type_bool0";
                info->category = CATEGORY;
                info->summary = "Testing JSON boolean function (false).";
                info->description = "Test JSON abstraction library.";
@@ -177,7 +177,7 @@ AST_TEST_DEFINE(json_test_bool1)
 
        switch (cmd) {
        case TEST_INIT:
-               info->name = "bool1";
+               info->name = "type_bool1";
                info->category = CATEGORY;
                info->summary = "Testing JSON boolean function (true).";
                info->description = "Test JSON abstraction library.";
@@ -204,7 +204,7 @@ AST_TEST_DEFINE(json_test_null)
 
        switch (cmd) {
        case TEST_INIT:
-               info->name = "null";
+               info->name = "type_null";
                info->category = CATEGORY;
                info->summary = "Testing JSON null value.";
                info->description = "Test JSON abstraction library.";
@@ -256,7 +256,7 @@ AST_TEST_DEFINE(json_test_string)
 
        switch (cmd) {
        case TEST_INIT:
-               info->name = "string";
+               info->name = "type_string";
                info->category = CATEGORY;
                info->summary = "Basic string tests.";
                info->description = "Test JSON abstraction library.";
@@ -361,7 +361,7 @@ AST_TEST_DEFINE(json_test_int)
 
        switch (cmd) {
        case TEST_INIT:
-               info->name = "int";
+               info->name = "type_int";
                info->category = CATEGORY;
                info->summary = "Basic JSON integer tests.";
                info->description = "Test JSON abstraction library.";
@@ -1645,7 +1645,7 @@ AST_TEST_DEFINE(json_test_timeval)
 
        switch (cmd) {
        case TEST_INIT:
-               info->name = "timeval";
+               info->name = "type_timeval";
                info->category = CATEGORY;
                info->summary = "JSON encoding of timevals.";
                info->description = "Test JSON abstraction library.";