X Tutup
Skip to content

Commit f67408f

Browse files
committed
Improve tests for #greaseAsByteArray, #greaseByteAt:, #greaseByteCounts
1 parent 65bc55e commit f67408f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
tests-encoding
22
testGreaseAsByteArray
33
self assert: 1024 greaseAsByteArray equals: #[4 0].
4+
self assert: (SmallInteger maxVal + 10) greaseAsByteArray equals: #[16 0 0 0 0 0 0 9].
5+
self assert: (SmallInteger minVal - 10) greaseAsByteArray equals: #[16 0 0 0 0 0 0 10].
46
self assert: #[1 2 3] greaseAsByteArray equals: #[1 2 3].
57
self assert: '123' greaseAsByteArray equals: #[49 50 51]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
tests-encoding
22
testGreaseByteAt
33
self assert: (1024 greaseByteAt: 1) equals: 0.
4-
self assert: (1024 greaseByteAt: 2) equals: 4
4+
self assert: (1024 greaseByteAt: 2) equals: 4.
5+
self assert: ((SmallInteger maxVal + 10) greaseByteAt: 1) equals: 9.
6+
self assert: ((SmallInteger maxVal + 10) greaseByteAt: 8) equals: 16.
7+
self assert: ((SmallInteger minVal - 10) greaseByteAt: 1) equals: 10.
8+
self assert: ((SmallInteger minVal - 10) greaseByteAt: 8) equals: 16
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
tests-encoding
22
testGreaseBytesCount
3-
self assert: 1024 greaseBytesCount equals: 2
3+
self assert: 1024 greaseBytesCount equals: 2.
4+
self assert: (SmallInteger maxVal + 10) greaseBytesCount equals: 8.
5+
self assert: (SmallInteger minVal + 10) greaseBytesCount equals: 8

0 commit comments

Comments
 (0)
X Tutup