The Trunk: Tests-ul.397.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tests-ul.397.mcz

commits-2
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.397.mcz

==================== Summary ====================

Name: Tests-ul.397
Author: ul
Time: 14 June 2018, 11:28:35.102959 pm
UUID: 7cc15100-1821-4093-b549-f524fc76a6c4
Ancestors: Tests-dtl.396

- do not nag the user about setting the author initials

=============== Diff against Tests-dtl.396 ===============

Item was changed:
  ----- Method: ArrayLiteralTest>>testReservedIdentifiers (in category 'tests') -----
  testReservedIdentifiers
+ self class compileSilently: 'array ^ #(nil true false)'.
- self class compile: 'array ^ #(nil true false)'.
  self assert: self array = {nil. true. false}.!

Item was changed:
  ----- Method: ArrayLiteralTest>>testSymbols (in category 'tests') -----
  testSymbols
+ self class compileSilently: 'array ^ #(#nil #true #false #''nil'' #''true'' #''false'')'.
- self class compile: 'array ^ #(#nil #true #false #''nil'' #''true'' #''false'')'.
  self assert: self array = {#nil. #true. #false. #nil. #true. #false}.!

Item was added:
+ ----- Method: ClassRemovalTest>>performTest (in category 'as yet unclassified') -----
+ performTest
+
+ Utilities
+ useAuthorInitials: self className
+ during: [ super performTest ]!

Item was changed:
  ----- Method: DecompilerTests>>testDecompileLoopWithMovingLimit (in category 'tests') -----
  testDecompileLoopWithMovingLimit
  "This is a non regression test for http://bugs.squeak.org/view.php?id=7093"
 
  | decompiledCode sourceCode |
  sourceCode := 'loopWithMovingLimit
  "This loop might be decompiled as a to:do: but should not because it does modify its limit"
  | n i |
  n := 4.
  i := 1.
  [i <= n] whileTrue: [
  n := n - 1.
  i := i + 1].
  ^n'.
+ self class compileSilently: sourceCode.
- self class compile: sourceCode.
  self assert: (self class includesSelector: #loopWithMovingLimit).
  self assert: 2 equals: (self perform: #loopWithMovingLimit).
  decompiledCode := self class decompile: #loopWithMovingLimit.
+ self class compileSilently: decompiledCode decompileString.
- self class compile: decompiledCode decompileString.
  self
  assert: 2
  equals: (self perform: #loopWithMovingLimit)
  description: 'result from decompiledCode should not differ from sourceCode'.!

Item was changed:
  ----- Method: EnvironmentTest>>testInternalVisibility (in category 'compiling tests') -----
  testInternalVisibility
  "A method on a class in an environment
  can refer to other classes in that environment
  (provided the environment imports its self)"
 
  | griffle plonk |
  env importSelf.
  self createClass: #Griffle.
  self createClass: #Plonk.
  griffle := env at: #Griffle.
+ griffle compileSilently: 'plonk ^ Plonk'.
- griffle compile: 'plonk ^ Plonk'.
  plonk := griffle new plonk.
  self assert: (env at: #Plonk) == plonk!

Item was changed:
  ----- Method: EnvironmentTest>>testStoreDomesticValue (in category 'compiling tests') -----
  testStoreDomesticValue
  "Create a class that implements #doStore.
  (see the comment in #storeValueMethod.)
  Send the message, then examine the results.
  The two values should be identical."
 
  | griffle values |
  env importSelf.
  env from: Smalltalk globals import: #Object.
  self createClass: #Griffle.
  env bind: #Plonk to: value.
 
  griffle := env at: #Griffle.
+ griffle compileSilently: self storeValueMethod.
- griffle compile: self storeValueMethod.
  values := griffle new doStore.
 
  self assert: values isArray.
  self assert: values size = 2.
  self assert: values first == values last.
  self assert: (env valueOf: #Plonk) == values first!

Item was changed:
  ----- Method: EnvironmentTest>>testStoreImportedValue (in category 'compiling tests') -----
  testStoreImportedValue
  "Create a class that implements #doStore.
  Import #Plonk from another environment.
  (see the comment in #storeValueMethod.)
  Send the message, then examine the results.
  The two values should be identical."
 
  | griffle foreign values |
  self createClass: #Griffle.
  foreign := Environment withName: #Foreign.
  foreign exportSelf.
  foreign at: #Plonk put: 'v1'.
  env from: foreign import: #Plonk.
  env from: Smalltalk globals import: #Object.
 
  griffle := env at: #Griffle.
+ griffle compileSilently: self storeValueMethod.
- griffle compile: self storeValueMethod.
  values := griffle new doStore.
 
  self assert: values isArray.
  self assert: values size = 2.
  self assert: values first == values last.
  self assert: (foreign at: #Plonk) == values first!