Skip to content

Commit b7bf750

Browse files
committed
python: use updated names in test
1 parent 4fded84 commit b7bf750

File tree

1 file changed

+11
-11
lines changed
  • python/ql/test/experimental/dataflow/typetracking-summaries

1 file changed

+11
-11
lines changed

python/ql/test/experimental/dataflow/typetracking-summaries/summaries.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22
import os
33

44
# Simple summary
5-
tainted = identity(tracked) # $ tracked
5+
tainted = TTS_identity(tracked) # $ tracked
66
tainted # $ tracked
77

88
# Lambda summary
99
# I think the missing result is expected because type tracking
1010
# is not allowed to flow back out of a call.
11-
tainted_lambda = apply_lambda(lambda x: x, tracked) # $ tracked
11+
tainted_lambda = TTS_apply_lambda(lambda x: x, tracked) # $ tracked
1212
tainted_lambda # $ MISSING: tracked
1313

1414
# A lambda that directly introduces taint
15-
bad_lambda = apply_lambda(lambda x: tracked, 1) # $ tracked
15+
bad_lambda = TTS_apply_lambda(lambda x: tracked, 1) # $ tracked
1616
bad_lambda # $ tracked
1717

1818
# A lambda that breaks the flow
19-
untainted_lambda = apply_lambda(lambda x: 1, tracked) # $ tracked
19+
untainted_lambda = TTS_apply_lambda(lambda x: 1, tracked) # $ tracked
2020
untainted_lambda
2121

2222
# Collection summaries
23-
tainted_list = reversed([tracked]) # $ tracked
23+
tainted_list = TTS_reversed([tracked]) # $ tracked
2424
tl = tainted_list[0]
2525
tl # $ MISSING: tracked
2626

2727
# Complex summaries
2828
def add_colon(x):
2929
return x + ":"
3030

31-
tainted_mapped = list_map(add_colon, [tracked]) # $ tracked
31+
tainted_mapped = TTS_list_map(add_colon, [tracked]) # $ tracked
3232
tm = tainted_mapped[0]
3333
tm # $ MISSING: tracked
3434

3535
def explicit_identity(x):
3636
return x
3737

38-
tainted_mapped_explicit = list_map(explicit_identity, [tracked]) # $ tracked
38+
tainted_mapped_explicit = TTS_list_map(explicit_identity, [tracked]) # $ tracked
3939
tainted_mapped_explicit[0] # $ MISSING: tracked
4040

41-
tainted_mapped_summary = list_map(identity, [tracked]) # $ tracked
41+
tainted_mapped_summary = TTS_list_map(identity, [tracked]) # $ tracked
4242
tms = tainted_mapped_summary[0]
4343
tms # $ MISSING: tracked
4444

45-
another_tainted_list = append_to_list([], tracked) # $ tracked
45+
another_tainted_list = TTS_append_to_list([], tracked) # $ tracked
4646
atl = another_tainted_list[0]
4747
atl # $ MISSING: tracked
4848

@@ -53,9 +53,9 @@ def explicit_identity(x):
5353
tr # $ MISSING: tracked
5454

5555
x.secret = tracked # $ tracked=secret tracked
56-
r = read_secret(x) # $ tracked=secret tracked
56+
r = TTS_read_secret(x) # $ tracked=secret tracked
5757
r # $ tracked
5858

5959
y # $ tracked=secret
60-
set_secret(y, tracked) # $ tracked tracked=secret
60+
TTS_set_secret(y, tracked) # $ tracked tracked=secret
6161
y.secret # $ tracked tracked=secret

0 commit comments

Comments
 (0)