From d9eeb8bf57a63e28533be032d5a4378ad0263da9 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Fri, 21 Apr 2023 22:42:02 +0200 Subject: [PATCH] Berry remove superfluous test (#18473) --- lib/libesp32/berry/tests/json_advenced.be | 50 ----------------------- 1 file changed, 50 deletions(-) delete mode 100644 lib/libesp32/berry/tests/json_advenced.be diff --git a/lib/libesp32/berry/tests/json_advenced.be b/lib/libesp32/berry/tests/json_advenced.be deleted file mode 100644 index be3b87e0b..000000000 --- a/lib/libesp32/berry/tests/json_advenced.be +++ /dev/null @@ -1,50 +0,0 @@ -import os -import json - - - -def assert_load_failed(text) - assert(json.load(text) == nil) -end - -var input_file = open("tests/json_test_cases.json", "r") -var test_cases = json.load(input_file.read()) - -# check positive cases -var has_failed_positives = false -for case_name : test_cases["positive"].keys() - var case = test_cases["positive"][case_name] - var val = json.load(case) - if val == nil && case != "null" - print("Failed to load case: " + case_name) - has_failed_positives = true - end -end - -if has_failed_positives - assert(false) -end - -# check negative cases - -var has_failed_negatives = false -for case_name : test_cases["negative"].keys() - var case = test_cases["negative"][case_name] - - var val = json.load(case) - if val != nil - print("Failed to fail case: " + case_name + ", got: " + json.dump(val)) - has_failed_negatives = true - end -end - -if has_failed_negatives - # assert(false) -end - -# check "any" cases, only for crashes - -for case_name : test_cases["any"].keys() - var case = test_cases["any"][case_name] - var val = json.load(case) -end