Skip to content

Commit d55d157

Browse files
Add tests for TNS slice assignment.
1 parent 1efd600 commit d55d157

6 files changed

Lines changed: 16 additions & 0 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TNS: matrix = [[0d1, 0d2], [0d3, 0d4]]
2+
ASSIGN(matrix[*, 0d2], [[0d9], [0d10]])
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TNS: vec = [0d1, 0d2]
2+
ASSIGN(vec[0d1-0d2], [0d1.5, 0d2.5])
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TNS: vec = [0d1, 0d2]
2+
ASSIGN(vec[0d1-0d2], 0d9)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TNS: matrix = [[0d1, 0d2], [0d3, 0d4]]
2+
ASSIGN(matrix[*, *], [[0d9, 0d10, 0d11], [0d12, 0d13, 0d14]])
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
TNS: vec = [0d1, 0d2, 0d3]
2+
3+
ASSERT(EQ(ASSIGN(vec[0d1-0d2], [0d9, 0d10]), [0d9, 0d10]))
4+
ASSERT(EQ(vec, [0d9, 0d10, 0d3]))
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
TNS: matrix = [[0d1, 0d2], [0d3, 0d4]]
2+
3+
ASSERT(EQ(ASSIGN(matrix[*, 0d2], [0d9, 0d10]), [0d9, 0d10]))
4+
ASSERT(EQ(matrix, [[0d1, 0d9], [0d3, 0d10]]))

0 commit comments

Comments
 (0)