squiggle/packages/squiggle-lang/__tests__/Reducer/Reducer_constructArray_test.res

14 lines
347 B
Plaintext
Raw Permalink Normal View History

2022-09-06 18:14:24 +00:00
open Jest
open Reducer_Peggy_TestHelpers
describe("Construct Array", () => {
2022-09-17 22:19:08 +00:00
testToExpression("[1,2]", "[1, 2]", ~v="[1,2]", ())
testToExpression("[]", "[]", ~v="[]", ())
2022-09-06 18:14:24 +00:00
testToExpression(
"f(x)=x; g(x)=x; [f, g]",
2022-09-17 22:19:08 +00:00
"f = {|x| {x}}; g = {|x| {x}}; [f, g]",
2022-09-06 18:14:24 +00:00
~v="[lambda(x=>internal code),lambda(x=>internal code)]",
(),
)
})