Restore wrong commit

This commit is contained in:
freestrings 2020-02-16 13:19:32 +09:00
parent b736c962d2
commit 32eef3f7c7

View File

@ -141,78 +141,78 @@ fn return_type() {
fn op_default() { fn op_default() {
setup(); setup();
// select_and_then_compare( select_and_then_compare(
// "$.school[?(@.friends == @.friends)]", "$.school[?(@.friends == @.friends)]",
// read_json("./benchmark/data_obj.json"), read_json("./benchmark/data_obj.json"),
// json!([{ json!([{
// "friends": [ "friends": [
// {"id": 0, "name": "Millicent Norman"}, {"id": 0, "name": "Millicent Norman"},
// {"id": 1, "name": "Vincent Cannon" }, {"id": 1, "name": "Vincent Cannon" },
// {"id": 2, "name": "Gray Berry"} {"id": 2, "name": "Gray Berry"}
// ] ]
// }]), }]),
// ); );
//
// select_and_then_compare( select_and_then_compare(
// "$.friends[?(@.name)]", "$.friends[?(@.name)]",
// read_json("./benchmark/data_obj.json"), read_json("./benchmark/data_obj.json"),
// json!([ json!([
// { "id" : 1, "name" : "Vincent Cannon" }, { "id" : 1, "name" : "Vincent Cannon" },
// { "id" : 2, "name" : "Gray Berry" } { "id" : 2, "name" : "Gray Berry" }
// ]), ]),
// ); );
//
// select_and_then_compare( select_and_then_compare(
// "$.friends[?(@.id >= 2)]", "$.friends[?(@.id >= 2)]",
// read_json("./benchmark/data_obj.json"), read_json("./benchmark/data_obj.json"),
// json!([ json!([
// { "id" : 2, "name" : "Gray Berry" } { "id" : 2, "name" : "Gray Berry" }
// ]), ]),
// ); );
//
// select_and_then_compare( select_and_then_compare(
// "$.friends[?(@.id >= 2 || @.id == 1)]", "$.friends[?(@.id >= 2 || @.id == 1)]",
// read_json("./benchmark/data_obj.json"), read_json("./benchmark/data_obj.json"),
// json!([ json!([
// { "id" : 2, "name" : "Gray Berry" }, { "id" : 2, "name" : "Gray Berry" },
// { "id" : 1, "name" : "Vincent Cannon" } { "id" : 1, "name" : "Vincent Cannon" }
// ]), ]),
// ); );
//
// select_and_then_compare( select_and_then_compare(
// "$.friends[?( (@.id >= 2 || @.id == 1) && @.id == 0)]", "$.friends[?( (@.id >= 2 || @.id == 1) && @.id == 0)]",
// read_json("./benchmark/data_obj.json"), read_json("./benchmark/data_obj.json"),
// json!([Value::Null]), json!([Value::Null]),
// ); );
//
// select_and_then_compare( select_and_then_compare(
// "$..friends[?(@.id == $.index)].id", "$..friends[?(@.id == $.index)].id",
// read_json("./benchmark/data_obj.json"), read_json("./benchmark/data_obj.json"),
// json!([0, 0]), json!([0, 0]),
// ); );
//
// select_and_then_compare( select_and_then_compare(
// "$..book[?($.store.bicycle.price < @.price)].price", "$..book[?($.store.bicycle.price < @.price)].price",
// read_json("./benchmark/example.json"), read_json("./benchmark/example.json"),
// json!([22.99]), json!([22.99]),
// ); );
//
// select_and_then_compare( select_and_then_compare(
// "$..book[?( (@.price == 12.99 || @.category == 'reference') && @.price > 10)].price", "$..book[?( (@.price == 12.99 || @.category == 'reference') && @.price > 10)].price",
// read_json("./benchmark/example.json"), read_json("./benchmark/example.json"),
// json!([12.99]), json!([12.99]),
// ); );
//
// select_and_then_compare( select_and_then_compare(
// "$..[?(@.age > 40)]", "$..[?(@.age > 40)]",
// json!([ json!([
// { "name": "이름1", "age": 40, "phone": "+33 12341234" }, { "name": "이름1", "age": 40, "phone": "+33 12341234" },
// { "name": "이름2", "age": 42, "phone": "++44 12341234" } { "name": "이름2", "age": 42, "phone": "++44 12341234" }
// ]), ]),
// json!([ json!([
// { "name" : "이름2", "age" : 42, "phone" : "++44 12341234" } { "name" : "이름2", "age" : 42, "phone" : "++44 12341234" }
// ]), ]),
// ); );
select_and_then_compare( select_and_then_compare(
"$..[?(@.age >= 30)]", "$..[?(@.age >= 30)]",