Berry remove superfluous test (#18473)

This commit is contained in:
s-hadinger 2023-04-21 22:42:02 +02:00 committed by GitHub
parent f5e6ba956d
commit d9eeb8bf57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 50 deletions

View File

@ -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