algebrite
Version:
Computer Algebra System in Coffeescript
47 lines (32 loc) • 420 B
text/coffeescript
test_index = ->
run_test [
"A=((A11,A12),(A21,A22))",
"",
"A[1,1]",
"A11",
"A[1,2]",
"A12",
"A[2,1]",
"A21",
"A[2,2]",
"A22",
"A[1]",
"(A11,A12)",
"A[2]",
"(A21,A22)",
"A[1]=(B11,B12)",
"",
"A",
"((B11,B12),(A21,A22))",
"A[2]=(B21,B22)",
"",
"A",
"((B11,B12),(B21,B22))",
"A=((0,0),(0,0))",
"",
"A[1,1]",
"0",
# index of scalar ok
"1[2]",
"1",
]