difftreelog
feat enable native go-testdata tests
in: master
4 files changed
tests/go_testdata_golden_override/native4.jsonnet.goldendiffbeforeafterboth1only functions can be called, got null1runtime error: xxx2 native4.jsonnet:1:28-32: error statement3 argument <x> evaluation4 native4.jsonnet:1:27-39: function <json_to_string> calltests/go_testdata_golden_override/native5.jsonnet.goldendiffbeforeafterboth1only functions can be called, got null1runtime error: tried to manifest function2 native5.jsonnet:1:27-41: function <json_to_string> calltests/go_testdata_golden_override/native7.jsonnet.goldendiffbeforeafterboth1only functions can be called, got null1parameter y is not defined2 native7.jsonnet:1:27-32: function <json_to_string> preparationtests/tests/cpp_test_suite.rsdiffbeforeafterboth5};5};667use jrsonnet_evaluator::{7use jrsonnet_evaluator::{8 FileImportResolver, IStr, ObjValueBuilder, State, Val, apply_tla,8 FileImportResolver, IStr, ObjValueBuilder, Result, State, Val, apply_tla,9 function::builtin,9 gc::WithCapacityExt as _,10 gc::WithCapacityExt as _,10 manifest::JsonFormat,11 manifest::JsonFormat,11 rustc_hash::FxHashMap,12 rustc_hash::FxHashMap,18mod common;19mod common;19use common::ContextInitializer as TestContextInitializer;20use common::ContextInitializer as TestContextInitializer;2122#[builtin]23fn json_to_string(x: Val) -> Result<String> {24 x.manifest(JsonFormat::minify(25 #[cfg(feature = "exp-preserve-order")]26 false,27 ))28}202921fn run(file: &Path, root: &Path) -> String {30fn run(file: &Path, root: &Path) -> String {22 let mut s = State::builder();31 let mut s = State::builder();30 .expect("code is valid");39 .expect("code is valid");314032 // Golang test suite41 // Golang test suite42 std_context.add_native("jsonToString", json_to_string {});33 std_context43 std_context34 .add_ext_code("codeVar", "3+3")44 .add_ext_code("codeVar", "3+3")35 .expect("code is valid");45 .expect("code is valid");147 "multi_no_newline.jsonnet",157 "multi_no_newline.jsonnet",148 "multi_no_newline_string_output.jsonnet",158 "multi_no_newline_string_output.jsonnet",149 "multi_string_output.jsonnet",159 "multi_string_output.jsonnet",150 // Tested otherwise151 "native1.jsonnet",152 "native2.jsonnet",153 "native3.jsonnet",154 "native6.jsonnet",155 // Golang fails with max stack frames exceeded error160 // Golang fails with max stack frames exceeded error156 "std.makeArray_recursive_evalutation_order_matters.jsonnet",161 "std.makeArray_recursive_evalutation_order_matters.jsonnet",157 // Tailstrict semantics is partially unspecified162 // Tailstrict semantics is partially unspecified