summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-10-04 22:44:46 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-10-04 22:44:46 -0300
commitf0e944696144016ca59aaed02381f7ea9d1ef848 (patch)
treed9c3232b920e3cd2358c3d91ee5ec5d26cec26a1 /tests
parent83d575f8a143ba031f1aa43995f6809470b8b15c (diff)
Initial VM work
Diffstat (limited to 'tests')
-rw-r--r--tests/basic_match.rs5
-rw-r--r--tests/parser_prop.rs2
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/basic_match.rs b/tests/basic_match.rs
index 5c03a48..b8d0dd8 100644
--- a/tests/basic_match.rs
+++ b/tests/basic_match.rs
@@ -4,13 +4,12 @@
 use serde_json::Deserializer as JsonDer;
 use serde::Deserialize;
 
-use datafu::Predicate;
+//use datafu::Predicate;
 
 #[test]
 fn test_basic() {
     let mut der = JsonDer::from_str(r#"{"foo": 1, "bar": {"baz": 2}}"#);
-    let preds = vec![("dict", datafu::pred(|v| { todo!(); false }))].into_iter().collect();
-    let pat = datafu::Pattern::<()>::compile::<&str, &str>("->[x]:?$dict->y[yk]", Some(preds), None).unwrap();
+    let pat = datafu::PatternBuilder::for_pattern("->[x]:map->[yk]y").compile().unwrap();
     #[derive(Deserialize)]
     struct Values {
         x: String,
diff --git a/tests/parser_prop.rs b/tests/parser_prop.rs
index 0b57171..8a4cbeb 100644
--- a/tests/parser_prop.rs
+++ b/tests/parser_prop.rs
@@ -6,6 +6,6 @@ use proptest::prelude::*;
 proptest! {
     #[test]
     fn doesnt_panic(s in "\\PC*") {
-        let _ = datafu::Pattern::<Box<dyn erased_serde::Serialize>>::compile::<&str, &str>(&s, None, None);
+        let _ = datafu::PatternBuilder::for_pattern(&s).compile();
     }
 }