Skip to content

Commit 6971f8d

Browse files
committed
Added tests
1 parent dde0dcc commit 6971f8d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/lcs/core/array/array.livecodescript

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,23 @@ on TestExtents
113113
TestAssert "Extents of dimensional arrays", the extents of tDimensionalArray is tExpectedExtents
114114
end TestExtents
115115

116+
on TestExtentsDecimal
117+
local tArray
118+
repeat with i=1 to 5
119+
put "true" into tArray[i]
120+
end repeat
121+
put "false" into tArray[1.0]
122+
123+
TestAssert "Extents of array with a decimal key", the extents of tArray is empty
124+
125+
delete variable tArray[1.0]
126+
TestAssert "Extents of array without key", the extents of tArray is (item 1 of tSequenceKeys, item -1 of tSequenceKeys)
127+
128+
put "false" into tArray[pi]
129+
TestAssert "Extents of array with another decimal key", the extents of tArray is empty
130+
131+
end TestExtentsDecimal
132+
116133
on __testIsAmong pUseIsAmong
117134
local tArray, tKeyList, tKeys
118135

0 commit comments

Comments
 (0)