Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit fe62733

Browse files
committed
[[ Constants ]] Update is strictly tests after constants refactor
This patch tweaks the `is strictly <type>` tests to reflect the fact that constants are strictly of the expected underlying type - numeral word constants are integers, true and false are boolean and infinity is a real.
1 parent 00fdbd0 commit fe62733

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

tests/lcs/core/logic/isstrictly.livecodescript

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,38 @@ on TestStrictlyNothing
4545
end TestStrictlyNothing
4646

4747
on TestStrictlyBoolean
48+
__TestIsStrictly true, "a boolean"
49+
__TestIsStrictly false, "a boolean"
4850
__TestIsStrictly true and true, "a boolean"
4951
__TestIsStrictly false and true, "a boolean"
5052
end TestStrictlyBoolean
5153

5254
on TestStrictlyInteger
5355
__TestIsStrictly the number of items in "_", "an integer"
56+
__TestIsStrictly zero, "an integer"
57+
__TestIsStrictly one, "an integer"
58+
__TestIsStrictly two, "an integer"
59+
__TestIsStrictly three, "an integer"
60+
__TestIsStrictly four, "an integer"
61+
__TestIsStrictly five, "an integer"
62+
__TestIsStrictly six, "an integer"
63+
__TestIsStrictly seven, "an integer"
64+
__TestIsStrictly eight, "an integer"
65+
__TestIsStrictly nine, "an integer"
66+
__TestIsStrictly ten, "an integer"
5467
end TestStrictlyInteger
5568

5669
on TestStrictlyReal
57-
__TestIsStrictly infinity + 0.0, "a real"
70+
__TestIsStrictly infinity, "a real"
71+
__TestIsStrictly pi, "a real"
5872
end TestStrictlyReal
5973

6074
on TestStrictlyString
6175
__TestIsStrictly "nothing", "a string"
6276
__TestIsStrictly 1, "a string"
6377
__TestIsStrictly 1.0, "a string"
64-
__TestIsStrictly infinity, "a string"
65-
__TestIsStrictly true, "a string"
78+
__TestIsStrictly null, "a string"
79+
__TestIsStrictly empty, "a string"
6680
end TestStrictlyString
6781

6882
on TestStrictlyBinaryString

0 commit comments

Comments
 (0)