Skip to content

Commit 187dd4c

Browse files
committed
Update other tests
1 parent 02c6260 commit 187dd4c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dsc_lib/src/functions/first.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ mod tests {
6868
#[test]
6969
fn array_of_mixed() {
7070
let mut parser = Statement::new().unwrap();
71-
let result = parser.parse_and_execute("[first(array('hello', 42))]", &Context::new()).unwrap();
71+
let result = parser.parse_and_execute("[first(createArray('hello', 42))]", &Context::new()).unwrap();
7272
assert_eq!(result.as_str(), Some("hello"));
7373
}
7474

dsc_lib/src/functions/index_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ mod tests {
9494
#[test]
9595
fn find_array_in_array() {
9696
let mut parser = Statement::new().unwrap();
97-
let result = parser.parse_and_execute("[indexOf(array(createArray('a', 'b'), createArray('c', 'd')), createArray('c', 'd'))]", &Context::new()).unwrap();
97+
let result = parser.parse_and_execute("[indexOf(createArray(createArray('a', 'b'), createArray('c', 'd')), createArray('c', 'd'))]", &Context::new()).unwrap();
9898
assert_eq!(result, 1);
9999
}
100100

101101
#[test]
102102
fn find_object_in_array() {
103103
let mut parser = Statement::new().unwrap();
104-
let result = parser.parse_and_execute("[indexOf(array(createObject('name', 'John'), createObject('name', 'Jane')), createObject('name', 'Jane'))]", &Context::new()).unwrap();
104+
let result = parser.parse_and_execute("[indexOf(createArray(createObject('name', 'John'), createObject('name', 'Jane')), createObject('name', 'Jane'))]", &Context::new()).unwrap();
105105
assert_eq!(result, 1);
106106
}
107107

0 commit comments

Comments
 (0)