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

mattonem / PharoJS / 13769533356

10 Mar 2025 04:16PM UTC coverage: 59.419% (-3.4%) from 62.831%
13769533356

push

github

mattonem
test results?

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

784 existing lines in 18 files now uncovered.

12529 of 21086 relevant lines covered (59.42%)

0.59 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
]
×
20

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

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

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

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

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

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

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

60
{ #category : 'tests' }
UNCOV
61
PjStreamTest >> testStringWrite [
×
UNCOV
62
        self assertEquivalent: ['' writeStream nextPut: $x;nextPutAll: 'abc';contents].
×
UNCOV
63
]
×
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