@@ -24,8 +24,8 @@ func testSet(ix: Int) {
2424 let taintedSet = Set ( [ 1 , 2 , source ( " t1 " ) ] )
2525 sink ( arg: taintedSet) // $ tainted=t1
2626 sink ( arg: taintedSet. randomElement ( ) !) // $ tainted=t1
27- sink ( arg: taintedSet. min ( ) !) // $ MISSING: tainted=t1
28- sink ( arg: taintedSet. max ( ) !) // $ MISSING: tainted=t1
27+ sink ( arg: taintedSet. min ( ) !) // $ tainted=t1
28+ sink ( arg: taintedSet. max ( ) !) // $ tainted=t1
2929 sink ( arg: taintedSet. firstIndex ( of: source ( " t2 " ) ) !)
3030 sink ( arg: taintedSet [ taintedSet. firstIndex ( of: source ( " t3 " ) ) !] ) // $ tainted=t1
3131 sink ( arg: taintedSet. first!) // $ tainted=t1
@@ -53,52 +53,52 @@ func testSet(ix: Int) {
5353
5454 var set2 = Set < Int > ( )
5555 set2. update ( with: source ( " t5 " ) )
56- sink ( arg: set2. randomElement ( ) !) // $ MISSING: tainted=t5
56+ sink ( arg: set2. randomElement ( ) !) // $ tainted=t5
5757
5858 var set3 = Set ( [ source ( " t6 " ) ] )
5959 sink ( arg: set3. randomElement ( ) !) // $ tainted=t6
6060 let ( inserted, previous) = set3. insert ( source ( " t7 " ) )
6161 sink ( arg: inserted)
62- sink ( arg: previous) // $ tainted=t6 tainted= t7
62+ sink ( arg: previous) // $ tainted=t7
6363 let previous2 = set3. update ( with: source ( " t8 " ) )
64- sink ( arg: previous2!) // $ MISSING: tainted=t8
64+ sink ( arg: previous2!) // $ tainted=t8
6565 let previous3 = set3. remove ( source ( " t9 " ) )
66- sink ( arg: previous3!) // $ MISSING: tainted=t9
66+ sink ( arg: previous3!) // $ tainted=t9
6767 let previous4 = set3. removeFirst ( )
68- sink ( arg: previous4) // $ MISSING: tainted=t6
68+ sink ( arg: previous4) // $ tainted=t6 tainted=t7 tainted=t8
6969 let previous5 = set3. remove ( at: set3. firstIndex ( of: source ( " t10 " ) ) !)
70- sink ( arg: previous5) // $ MISSING: tainted=t6
70+ sink ( arg: previous5) // $ tainted=t6 tainted=t7 tainted=t8
7171
7272 sink ( arg: goodSet. union ( goodSet) . randomElement ( ) !)
73- sink ( arg: goodSet. union ( taintedSet) . randomElement ( ) !) // $ MISSING: tainted=t1
74- sink ( arg: taintedSet. union ( goodSet) . randomElement ( ) !) // $ MISSING: tainted=t1
75- sink ( arg: taintedSet. union ( taintedSet) . randomElement ( ) !) // $ MISSING: tainted=t1
73+ sink ( arg: goodSet. union ( taintedSet) . randomElement ( ) !) // $ tainted=t1
74+ sink ( arg: taintedSet. union ( goodSet) . randomElement ( ) !) // $ tainted=t1
75+ sink ( arg: taintedSet. union ( taintedSet) . randomElement ( ) !) // $ tainted=t1
7676
7777 var set4 = Set < Int > ( )
7878 set4. formUnion ( goodSet)
7979 sink ( arg: set4. randomElement ( ) !)
8080 set4. formUnion ( taintedSet)
81- sink ( arg: set4. randomElement ( ) !) // $ MISSING: tainted=t1
81+ sink ( arg: set4. randomElement ( ) !) // $ tainted=t1
8282 set4. formUnion ( goodSet)
83- sink ( arg: set4. randomElement ( ) !) // $ MISSING: tainted=t1
83+ sink ( arg: set4. randomElement ( ) !) // $ tainted=t1
8484
8585 sink ( arg: goodSet. intersection ( goodSet) . randomElement ( ) !)
8686 sink ( arg: goodSet. intersection ( taintedSet) . randomElement ( ) !)
87- sink ( arg: taintedSet. intersection ( goodSet) . randomElement ( ) !)
88- sink ( arg: taintedSet. intersection ( taintedSet) . randomElement ( ) !) // $ MISSING: tainted=t1
87+ sink ( arg: taintedSet. intersection ( goodSet) . randomElement ( ) !) // $ SPURIOUS: tainted=t1
88+ sink ( arg: taintedSet. intersection ( taintedSet) . randomElement ( ) !) // $ tainted=t1
8989
9090 sink ( arg: goodSet. symmetricDifference ( goodSet) . randomElement ( ) !)
91- sink ( arg: goodSet. symmetricDifference ( taintedSet) . randomElement ( ) !) // $ MISSING: tainted=t1
92- sink ( arg: taintedSet. symmetricDifference ( goodSet) . randomElement ( ) !) // $ MISSING: tainted=t1
93- sink ( arg: taintedSet. symmetricDifference ( taintedSet) . randomElement ( ) !) // $ MISSING: tainted=t1
91+ sink ( arg: goodSet. symmetricDifference ( taintedSet) . randomElement ( ) !) // $ tainted=t1
92+ sink ( arg: taintedSet. symmetricDifference ( goodSet) . randomElement ( ) !) // $ tainted=t1
93+ sink ( arg: taintedSet. symmetricDifference ( taintedSet) . randomElement ( ) !) // $ tainted=t1
9494
9595 sink ( arg: goodSet. subtracting ( goodSet) . randomElement ( ) !)
9696 sink ( arg: goodSet. subtracting ( taintedSet) . randomElement ( ) !)
97- sink ( arg: taintedSet. subtracting ( goodSet) . randomElement ( ) !) // $ MISSING: tainted=t1
98- sink ( arg: taintedSet. subtracting ( taintedSet) . randomElement ( ) !) // $ MISSING: tainted=t1
97+ sink ( arg: taintedSet. subtracting ( goodSet) . randomElement ( ) !) // $ tainted=t1
98+ sink ( arg: taintedSet. subtracting ( taintedSet) . randomElement ( ) !) // $ tainted=t1
9999
100- sink ( arg: taintedSet. sorted ( ) . randomElement ( ) !) // $ MISSING: tainted=t1
101- sink ( arg: taintedSet. shuffled ( ) . randomElement ( ) !) // $ MISSING: tainted=t1
100+ sink ( arg: taintedSet. sorted ( ) . randomElement ( ) !) // $ tainted=t1
101+ sink ( arg: taintedSet. shuffled ( ) . randomElement ( ) !) // $ tainted=t1
102102
103103 sink ( arg: taintedSet. lazy [ taintedSet. firstIndex ( of: source ( " t11 " ) ) !] ) // $ tainted=t1
104104
0 commit comments