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

mattonem / PharoJS / 14220696386

11 Mar 2025 04:04PM UTC coverage: 42.026% (-17.4%) from 59.444%
14220696386

push

github

mattonem
more catching

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

3707 existing lines in 69 files now uncovered.

8909 of 21199 relevant lines covered (42.03%)

0.42 hits per line

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

0.0
/Pharo/PharoJs-Base-JS-CoreLibraries-Tests/PjOrderedCollectionTest.class.st
1
Class {
2
        #name : 'PjOrderedCollectionTest',
3
        #superclass : 'PjBridgeTestCase',
4
        #instVars : [
5
                'collection'
6
        ],
7
        #category : 'PharoJs-Base-JS-CoreLibraries-Tests-Collections',
8
        #package : 'PharoJs-Base-JS-CoreLibraries-Tests',
9
        #tag : 'Collections'
10
}
11

12
{ #category : 'running' }
UNCOV
13
PjOrderedCollectionTest >> setUp [
×
UNCOV
14
        super setUp.
×
UNCOV
15
        collection := self evalBlock: [ OrderedCollection new ]
×
UNCOV
16
]
×
17

18
{ #category : 'tests' }
UNCOV
19
PjOrderedCollectionTest >> testCircularReference [
×
UNCOV
20
        self deny: (collection includes: collection).
×
UNCOV
21
        collection add: 'A'.
×
UNCOV
22
        self deny: (collection includes: collection).
×
UNCOV
23
        collection add: collection.
×
UNCOV
24
        self assert: (collection includes: collection).
×
UNCOV
25
        self assert: collection size equals: 2.
×
UNCOV
26
]
×
27

28
{ #category : 'tests' }
UNCOV
29
PjOrderedCollectionTest >> testConverstionToOrderedCollection [
×
UNCOV
30

×
UNCOV
31
        self
×
UNCOV
32
                deny: (OrderedCollection with: collection)
×
UNCOV
33
                identicalTo: collection
×
UNCOV
34
]
×
35

36
{ #category : 'tests' }
UNCOV
37
PjOrderedCollectionTest >> testInsertElementBeforeFirstOne [
×
UNCOV
38
        collection addAll: #(1 2 3).
×
UNCOV
39
        collection insert: 0 before: 1.
×
UNCOV
40
        self assert: collection size equals: 4.
×
UNCOV
41
        (0 to: 3) withIndexDo: [ : expectedElement : index |
×
UNCOV
42
                self assert: (collection at: index) equals: expectedElement
×
UNCOV
43
        ]
×
UNCOV
44
]
×
45

46
{ #category : 'tests' }
UNCOV
47
PjOrderedCollectionTest >> testJoin [
×
UNCOV
48
        | temp |
×
UNCOV
49
        collection addAll: #(4 5).
×
UNCOV
50
        temp := collection join: #((1 2 3) (6 7) (3 2)).
×
UNCOV
51
        self assert: collection size equals: 2.
×
UNCOV
52
        self assert: temp size equals: 11.
×
UNCOV
53
        #(1 2 3 4 5 6 7 4 5 3 2) withIndexDo: [ : expectedElement : index |
×
UNCOV
54
                self assert: (temp at: index) equals: expectedElement
×
UNCOV
55
        ]
×
UNCOV
56
]
×
57

58
{ #category : 'tests' }
UNCOV
59
PjOrderedCollectionTest >> testRemoveAll [
×
UNCOV
60
        collection addAll: #(1 2 3 4 5).
×
UNCOV
61
        collection removeAll: #(1 5).
×
UNCOV
62
        self assert: collection size equals: 3.
×
UNCOV
63
        #(2 3 4) withIndexDo: [ : expectedElement : index |
×
UNCOV
64
                self assert: (collection at: index) equals: expectedElement
×
UNCOV
65
        ].
×
UNCOV
66
        collection removeAll.
×
UNCOV
67
        self assert: collection isEmpty.
×
UNCOV
68
]
×
69

70
{ #category : 'tests' }
UNCOV
71
PjOrderedCollectionTest >> testSerialization [
×
UNCOV
72

×
UNCOV
73
        self assertEquivalent: [ OrderedCollection new asPhxJsonString ]
×
UNCOV
74
]
×
75

76
{ #category : 'tests' }
UNCOV
77
PjOrderedCollectionTest >> testWith [
×
UNCOV
78
        collection := self evalBlock: [ OrderedCollection with: 1 ].
×
UNCOV
79
        self assert: collection jsClassName equals: OrderedCollection javascriptPlaceholder name.
×
UNCOV
80
        collection := self evalBlock: [ OrderedCollection with: 1 with: 1].
×
UNCOV
81
        self assert: collection jsClassName equals: OrderedCollection javascriptPlaceholder name.
×
UNCOV
82
        
×
UNCOV
83
]
×
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