From 039adb06b75516e5b06e14eafa8557e210b6fc8f Mon Sep 17 00:00:00 2001 From: Ole Morud Date: Mon, 5 Jun 2023 22:27:23 +0200 Subject: [PATCH] Add pythons json.load() as test comparison --- arena-allocator | 2 +- test.sh | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arena-allocator b/arena-allocator index 90092cb..a656fed 160000 --- a/arena-allocator +++ b/arena-allocator @@ -1 +1 @@ -Subproject commit 90092cb278afe292d9322172e218bfcc2c189aef +Subproject commit a656feda7dbf06c2857b17604dc42cecef66ab56 diff --git a/test.sh b/test.sh index c207cd7..170e941 100755 --- a/test.sh +++ b/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/zsh # Build debug (./bin/release/parse) # make -B @@ -64,5 +64,14 @@ for file in sample-files/*.json; do echo "" done +# compare with python JSON.load() +stderr_output=$(mktemp) +echo -n "(release) comparing with python: " +time_cmd python3 </dev/null 2>$stderr_output +import json +print(json.load(open("sample-files/large-file.json"))) +EOS + +cat $stderr_output exit $ok