equal
deleted
inserted
replaced
451 ! ! |
451 ! ! |
452 |
452 |
453 !JITTest methodsFor:'public - test - logical'! |
453 !JITTest methodsFor:'public - test - logical'! |
454 |
454 |
455 testNot |
455 testNot |
456 |compiledMethod| |
|
457 |
|
458 self assert: (self tstSendNotTo: true) == false. |
456 self assert: (self tstSendNotTo: true) == false. |
459 self assert: (self tstSendNotTo: false) == true. |
457 self assert: (self tstSendNotTo: false) == true. |
460 self assert: (self tstSendNotTo: self) == #'not properly handled'. |
458 self assert: (self tstSendNotTo: self) == #'not properly handled'. |
461 |
459 |
462 compiledMethod := self class compiledMethodAt:#'testNot'. |
460 (Helper |
463 (compiledMethod notNil |
461 isStcCompiledMethod:#'testNot' |
464 and:[compiledMethod byteCode isNil]) ifTrue:[ |
462 in:self) ifTrue:[ |
465 "/ stc-compiled code handles not slightly differently |
463 "/ stc-compiled code handles not slightly differently |
466 "/ (does not raise an error) |
464 "/ (does not raise an error) |
467 'JITTest >> testNot: non-boolean cases skipped due to stc limitations' infoPrintCR. |
465 'JITTest >> testNot: non-boolean cases skipped due to stc limitations' infoPrintCR. |
468 ] ifFalse:[ |
466 ] ifFalse:[ |
469 self should: [ self tstSendNotTo: 1 ] raise: MessageNotUnderstood. |
467 self should: [ self tstSendNotTo: 1 ] raise: MessageNotUnderstood. |
470 ]. |
468 ]. |
471 |
469 |
472 |
470 |
473 |
471 |
474 |
472 |
475 "Created: / 18-11-2014 / 11:47:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
473 "Created: / 18-11-2014 / 11:47:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |