RBCustomTransformationRule subclass: #AssertEqualSignIntoAssertEquals instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Stef2'! !AssertEqualSignIntoAssertEquals methodsFor: 'initialization' stamp: 'StephaneDucasse 3/26/2016 14:35'! initialize super initialize. self lhs: 'self assert: ``@object1 = ``@object2'.self rhs: 'self assert: ``@object1 equals: ``@object2'.self input: '| poly | poly := DhbPolynomial coefficients: #(1 1 1). self assert: (poly + q12 at: 0) = (2 + 2 i) asQuaternion. self assert: (q12 + poly at: 0) = (2 + 2 i) asQuaternion'.self output: '| poly | poly := DhbPolynomial coefficients: #(1 1 1). self assert: (poly + q12 at: 0) equals: (2 + 2 i) asQuaternion. self assert: (q12 + poly at: 0) equals: (2 + 2 i) asQuaternion'. self rewriteRule replace: lhs with: rhs! ! RBCustomTransformationRule subclass: #ShouldTransformedIntoAssert instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Stef2'! !ShouldTransformedIntoAssert methodsFor: 'initialization' stamp: 'StephaneDucasse 3/26/2016 14:26'! initialize super initialize. self lhs: 'self should: [ ``@object1 ]'.self rhs: 'self assert: ``@object1'.self input: '| solver stepper system dt | dt := 0.01. system := ExplicitSystem block: [ :x :t | t sin ]. stepper := AB2Stepper onSystem: system. solver := AB2Solver new stepper: stepper; system: system; dt: dt. self should: [ (solver solve: system startState: -1 startTime: 0 endTime: Float pi) closeTo: 1 ]'.self output: '| solver stepper system dt | dt := 0.01. system := ExplicitSystem block: [ :x :t | t sin ]. stepper := AB2Stepper onSystem: system. solver := AB2Solver new stepper: stepper; system: system; dt: dt. self assert: ((solver solve: system startState: -1 startTime: 0 endTime: Float pi) closeTo: 1)'. self rewriteRule replace: lhs with: rhs! !