Skip to content

Commit 33f2d9d

Browse files
committed
Add test for the values keyword
The old code with too many checks for a sequence and not enough checks for a list would both make this fail. Signed-off-by: Connor Behan <[email protected]>
1 parent 7292294 commit 33f2d9d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/dummies.cdb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,20 @@ def test06():
8585
print("Test 06 passed")
8686

8787
test06()
88+
89+
# values tests
90+
91+
def test07():
92+
__cdbkernel__ = create_scope()
93+
{a, b}::Indices(values={-1..2}).
94+
{c, d}::Indices(values={-1,1,2}).
95+
\delta{#}::KroneckerDelta.
96+
ex1 := \delta_{a b} \delta_{a b}.
97+
eliminate_kronecker(ex1)
98+
assert ex1 == 4
99+
ex2 := \delta_{c d} \delta_{c d}.
100+
eliminate_kronecker(ex2)
101+
assert ex2 == $\delta_{d d}$
102+
print("Test 07 passed")
103+
104+
test07()

0 commit comments

Comments
 (0)