• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mattonem / PharoJS / 13784210198

11 Mar 2025 09:06AM UTC coverage: 59.622% (-1.0%) from 60.626%
13784210198

push

github

mattonem
wtf

2 of 2 new or added lines in 1 file covered. (100.0%)

537 existing lines in 12 files now uncovered.

12573 of 21088 relevant lines covered (59.62%)

0.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Pharo/PharoJs-Base-JS-CoreLibraries-Tests/PjStreamTest.class.st
1
"
2
I contain test for the simplistic Read/Write Stream implementation
3
"
4
Class {
5
        #name : 'PjStreamTest',
6
        #superclass : 'PjBridgeTestCase',
7
        #category : 'PharoJs-Base-JS-CoreLibraries-Tests-Collections',
8
        #package : 'PharoJs-Base-JS-CoreLibraries-Tests',
9
        #tag : 'Collections'
10
}
11

12
{ #category : 'tests' }
UNCOV
13
PjStreamTest >> testArrayRead [
×
UNCOV
14
        self assertEquivalent: [#(1 2 3) readStream next].
×
UNCOV
15
        self assertEquivalent: [#(1 2 3) readStream next;next].
×
UNCOV
16
        self assertEquivalent: [#(1 2 3) readStream next;next;next].
×
UNCOV
17
        self assertEquivalent: [#(1 2 3) readStream next;next;next;next].
×
UNCOV
18
        self assertEquivalent: [#(1 2 3) readStream next;next;next;atEnd].
×
UNCOV
19
        self assert: false.
×
UNCOV
20
]
×
21

22
{ #category : 'tests' }
UNCOV
23
PjStreamTest >> testArrayReadWrite [
×
UNCOV
24
        self assert: [#() writeStream nextPutAll: #(1 2 3);nextPutAll: #(4 5 6);next;next;next;next] evaluatesTo: 4.
×
UNCOV
25
]
×
26

27
{ #category : 'tests' }
UNCOV
28
PjStreamTest >> testArrayWrite [
×
UNCOV
29
        self assertEquivalent: [#(() writeStream nextPut: 3;nextPutAll: 'abc';contents) at: 2].
×
UNCOV
30
]
×
31

32
{ #category : 'tests' }
UNCOV
33
PjStreamTest >> testStringNewWrite [
×
UNCOV
34

×
UNCOV
35
        self assertEquivalent: [ 
×
UNCOV
36
                String new: 10 streamContents: [ :stream | stream << 'hello world' ] ]
×
UNCOV
37
]
×
38

39
{ #category : 'tests' }
UNCOV
40
PjStreamTest >> testStringPeek [
×
UNCOV
41
        self assertEquivalent: ['abc' readStream peek asString].
×
UNCOV
42
        self assertEquivalent: [('abc' readStream peek;next) asString].
×
UNCOV
43
        self assertEquivalent: [('abc' readStream next;peek;next) asString].
×
UNCOV
44
        self assertEquivalent: ['abc' readStream next;next;peek;atEnd].
×
UNCOV
45
]
×
46

47
{ #category : 'tests' }
UNCOV
48
PjStreamTest >> testStringRead [
×
UNCOV
49
        self assertEquivalent: ['abc' readStream next asString].
×
UNCOV
50
        self assertEquivalent: [('abc' readStream next;next) asString].
×
UNCOV
51
        self assertEquivalent: [('abc' readStream next;next;next) asString].
×
UNCOV
52
        self assertEquivalent: ['abc' readStream next;next;next;atEnd].
×
UNCOV
53
        self assertEquivalent: ['abc' readStream next;next;next;next].
×
UNCOV
54
]
×
55

56
{ #category : 'tests' }
UNCOV
57
PjStreamTest >> testStringReadWrite [
×
UNCOV
58
        self assert: [('' writeStream nextPutAll: 'abc';nextPutAll: 'def';next;next;next;next) asString] evaluatesTo: 'd'.
×
UNCOV
59
]
×
60

61
{ #category : 'tests' }
UNCOV
62
PjStreamTest >> testStringWrite [
×
UNCOV
63
        self assertEquivalent: ['' writeStream nextPut: $x;nextPutAll: 'abc';contents].
×
UNCOV
64
]
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc