[Asterisk-code-review] test json: Fix test names with reserved words (asterisk[14])

Jenkins2 asteriskteam at digium.com
Wed May 31 14:03:21 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5734 )

Change subject: test_json:  Fix test names with reserved words
......................................................................


test_json:  Fix test names with reserved words

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
---
M tests/test_json.c
1 file changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved
  Jenkins2: Approved for Submit
  Sean Bright: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/tests/test_json.c b/tests/test_json.c
index 7362a61..19496b4 100644
--- a/tests/test_json.c
+++ b/tests/test_json.c
@@ -100,7 +100,7 @@
 
 	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 @@
 
 	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 @@
 
 	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 @@
 
 	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 @@
 
 	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 @@
 
 	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 @@
 
 	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 @@
 
 	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.";

-- 
To view, visit https://gerrit.asterisk.org/5734
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I90d809f46969c78a1c605b736ff0635196a2cf1b
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>



More information about the asterisk-code-review mailing list