added subtract test

This commit is contained in:
Umur Ozkul 2022-05-19 15:21:49 +02:00
parent 7b5fd2b101
commit 4ce1ab1172

View File

@ -95,6 +95,9 @@ describe("Peggy parse", () => {
testParse("1 -> add(2)", "{(::add 1 2)}")
testParse("-1 -> add(2)", "{(::add (::unaryMinus 1) 2)}")
testParse("1 -> add(2) * 3", "{(::multiply (::add 1 2) 3)}")
testParse("1 -> subtract(2)", "{(::subtract 1 2)}")
testParse("-1 -> subtract(2)", "{(::subtract (::unaryMinus 1) 2)}")
testParse("1 -> subtract(2) * 3", "{(::multiply (::subtract 1 2) 3)}")
})
describe("elixir pipe", () => {