Skip to content

Commit

Permalink
Replace invalidated && with > in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hernán Morales Durand committed Mar 9, 2023
1 parent 19507e4 commit 093899c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions smalltalksrc/Slang-Tests/SlangBasicTranslationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3044,7 +3044,7 @@ SlangBasicTranslationTest >> testSendIfFalseAsArgumentWithNonLeafReceiver [
expression: (TSendNode new
setSelector: #ifFalse:
receiver: (TSendNode new
setSelector: #&
setSelector: #<
receiver: (TVariableNode new setName: 'x')
arguments: { (TVariableNode new setName: 'y') })
arguments: { (TStatementListNode new statements: {
Expand All @@ -3056,7 +3056,7 @@ SlangBasicTranslationTest >> testSendIfFalseAsArgumentWithNonLeafReceiver [
expression: (TConstantNode value: 1)) }) }).
translation := self translate: send.
self assert: translation trimBoth equals: 'y = ((!(x && y))
self assert: translation trimBoth equals: 'y = ((!(x < y))
? ((a = 0), (c = 1))
: 0)'
]
Expand All @@ -3072,7 +3072,7 @@ SlangBasicTranslationTest >> testSendIfFalseAsArgumentWithReceiverSendNot [
receiver: (TSendNode new
setSelector: #not
receiver: (TSendNode new
setSelector: #&
setSelector: #<
receiver: (TVariableNode new setName: 'x')
arguments: { (TVariableNode new setName: 'y') })
arguments: { })
Expand All @@ -3085,7 +3085,7 @@ SlangBasicTranslationTest >> testSendIfFalseAsArgumentWithReceiverSendNot [
expression: (TConstantNode value: 1)) }) }).
translation := self translate: send.
self assert: translation trimBoth equals: 'y = ((x && y)
self assert: translation trimBoth equals: 'y = ((x < y)
? ((a = 0), (c = 1))
: 0)'
]
Expand Down Expand Up @@ -3305,7 +3305,7 @@ SlangBasicTranslationTest >> testSendIfFalseWithNonLeafReceiver [
send := TSendNode new
setSelector: #ifFalse:
receiver: (TSendNode new
setSelector: #&
setSelector: #>
receiver: (TVariableNode new setName: 'x')
arguments: { (TVariableNode new setName: 'y') })
arguments: { (TStatementListNode new statements: {
Expand All @@ -3317,7 +3317,7 @@ SlangBasicTranslationTest >> testSendIfFalseWithNonLeafReceiver [
expression: (TConstantNode value: 1)) }) }.
translation := self translate: send.
self assert: translation trimBoth equals: 'if (!(x && y)) {
self assert: translation trimBoth equals: 'if (!(x > y)) {
a = 0;
c = 1;
}'
Expand Down Expand Up @@ -3849,7 +3849,7 @@ SlangBasicTranslationTest >> testSendIfTrueAsArgumentWithNonLeafReceiver [
expression: (TSendNode new
setSelector: #ifTrue:
receiver: (TSendNode new
setSelector: #&
setSelector: #==
receiver: (TVariableNode new setName: 'x')
arguments: { (TVariableNode new setName: 'y') })
arguments: { (TStatementListNode new statements: {
Expand All @@ -3861,7 +3861,7 @@ SlangBasicTranslationTest >> testSendIfTrueAsArgumentWithNonLeafReceiver [
expression: (TConstantNode value: 1)) }) }).
translation := self translate: send.
self assert: translation trimBoth equals: 'y = ((x && y)
self assert: translation trimBoth equals: 'y = ((x == y)
? ((a = 0), (c = 1))
: 0)'
]
Expand Down Expand Up @@ -4123,7 +4123,7 @@ SlangBasicTranslationTest >> testSendIfTrueWithReceiverBinaryOperation [
send := TSendNode new
setSelector: #ifTrue:
receiver: (TSendNode new
setSelector: #&
setSelector: #<
receiver: (TVariableNode new setName: 'a')
arguments: { (TVariableNode new setName: 'b') })
arguments: { (TStatementListNode new statements: {
Expand All @@ -4135,7 +4135,7 @@ SlangBasicTranslationTest >> testSendIfTrueWithReceiverBinaryOperation [
expression: (TConstantNode value: 1)) }) }.
translation := self translate: send.
self assert: translation trimBoth equals: 'if (a && b) {
self assert: translation trimBoth equals: 'if (a < b) {
a = 0;
c = 1;
}'
Expand Down Expand Up @@ -5683,7 +5683,7 @@ SlangBasicTranslationTest >> testSendWhileFalseWithOneStatementInReceiverBlock [
setSelector: #whileFalse:
receiver:
(TStatementListNode new statements: { (TSendNode new
setSelector: #&
setSelector: #>
receiver: (TVariableNode new setName: 'a')
arguments: { (TVariableNode new setName: 'b') }) })
arguments: { (TStatementListNode new statements:
Expand All @@ -5692,7 +5692,7 @@ SlangBasicTranslationTest >> testSendWhileFalseWithOneStatementInReceiverBlock [
expression: expression) }) }.
translation := self translate: send.
self assert: translation trimBoth equals: 'while (!(a && b)) {
self assert: translation trimBoth equals: 'while (!(a > b)) {
var -= 7;
}'
]
Expand Down Expand Up @@ -5782,7 +5782,7 @@ SlangBasicTranslationTest >> testSendWhileTrueWithNilAsArgument [
setVariable: variable
expression: expression).
(TSendNode new
setSelector: #&
setSelector: #<
receiver: (TVariableNode new setName: 'a')
arguments: { (TVariableNode new setName: 'b') }) })
arguments: { (TStatementListNode new statements:
Expand All @@ -5791,7 +5791,7 @@ SlangBasicTranslationTest >> testSendWhileTrueWithNilAsArgument [
self assert: translation trimBoth equals: 'do{
var -= 7;
}while(a && b)'
}while(a < b)'
]
{ #category : #'tests-builtins' }
Expand All @@ -5808,7 +5808,7 @@ SlangBasicTranslationTest >> testSendWhileTrueWithOneStatementInReceiverBlock [
setSelector: #whileTrue:
receiver:
(TStatementListNode new statements: { (TSendNode new
setSelector: #&
setSelector: #>
receiver: (TVariableNode new setName: 'a')
arguments: { (TVariableNode new setName: 'b') }) })
arguments: { (TStatementListNode new statements:
Expand All @@ -5817,7 +5817,7 @@ SlangBasicTranslationTest >> testSendWhileTrueWithOneStatementInReceiverBlock [
expression: expression) }) }.
translation := self translate: send.
self assert: translation trimBoth equals: 'while (a && b) {
self assert: translation trimBoth equals: 'while (a > b) {
var -= 7;
}'
]
Expand Down

0 comments on commit 093899c

Please sign in to comment.