Skip to content

Commit

Permalink
Make testCallTarget more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Oct 26, 2021
1 parent a0a6b53 commit fbb9a61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
testing
testCallTarget
| method string |
Java primitiveIsHostLookupAllowed ifFalse: [ ^ false ].
| method callTarget string |
Java primitiveIsHostLookupAllowed ifFalse: [ ^ self ].

self assert: (SmalltalkImage >> #exitToDebugger) callTarget isNil.

method := Integer >> #benchFib.
1 benchFib. "Ensure method is called"
callTarget := method callTarget.

self deny: method callTarget isNil.
self deny: callTarget isNil.

(callTarget getClass getName asString includesSubstring: 'OptimizedCallTarget')
ifFalse: [ ^ self ].

string := CallTargetBrowser callTargetInfoStringFor: method callTarget.
string := CallTargetBrowser callTargetInfoStringFor: callTarget.
self assert: (string includesSubstring: 'knownCallSiteCount')
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"assertSorted:name:" : "fn 1/25/2020 15:24",
"testAdoptInstanceArrays" : "fn 1/31/2020 10:20",
"testArrayStatistics" : "fn 5/13/2020 17:37",
"testCallTarget" : "fn 3/12/2021 11:08",
"testCallTarget" : "fn 10/26/2021 21:10",
"testLayoutStatistics" : "fn 5/13/2020 17:37",
"testTestMapConsistency" : "fn 3/9/2021 15:59",
"testVMIntrospection" : "fn 3/30/2021 17:01" } }

0 comments on commit fbb9a61

Please sign in to comment.