The Trunk: Tests-cwp.195.mcz

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

The Trunk: Tests-cwp.195.mcz

commits-2
Colin Putney uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-cwp.195.mcz

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

Name: Tests-cwp.195
Author: cwp
Time: 1 April 2013, 11:13:55.788 pm
UUID: d0b0de68-7e72-4291-a7c2-e9b35372660f
Ancestors: Tests-dtl.194

Make environment tests use the new binding classes, add tests for #literalEqual:.

=============== Diff against Tests-dtl.194 ===============

Item was changed:
  ----- Method: AliasTest>>testAsBindingRead (in category 'tests') -----
  testAsBindingRead
  | alias imported |
+ alias := (#Griffle => value) asBinding: #Plonk.
- alias := (#Griffle -> value) asBinding: #Plonk.
  imported := alias asBinding: #Nurp.
  self assert: imported key = #Nurp.
  self assert: imported value == value!

Item was changed:
  ----- Method: AliasTest>>testAsBindingWrite (in category 'tests') -----
  testAsBindingWrite
  | alias imported global |
+ global := Global key: #Griffle value: Object new.
- global := Association key: #Griffle value: Object new.
  alias := global asBinding: #Plonk.
  imported := alias asBinding: #Nurp.
  imported value: value.
  self assert: global value == value!

Item was changed:
  ----- Method: AliasTest>>testCanAssign (in category 'tests') -----
  testCanAssign
  | alias |
+ alias := Alias key: #Plonk source: #Giffle => value.
- alias := Alias key: #Plonk source: #Giffle -> value.
  self assert: alias canAssign!

Item was changed:
  ----- Method: AliasTest>>testIsSpecialRead (in category 'tests') -----
  testIsSpecialRead
  | alias |
+ alias := Alias key: #Plonk source: #Griffle => value.
- alias := Alias key: #Plonk source: #Griffle -> value.
  self assert: alias isSpecialReadBinding!

Item was changed:
  ----- Method: AliasTest>>testIsSpecialWrite (in category 'tests') -----
  testIsSpecialWrite
  | alias |
+ alias := Alias key: #Plonk source: #Griffle => value.
- alias := Alias key: #Plonk source: #Griffle -> value.
  self assert: alias isSpecialWriteBinding!

Item was added:
+ ----- Method: AliasTest>>testLiteralEqual (in category 'tests') -----
+ testLiteralEqual
+ | global a1 a2 |
+ global := #Giffle => value.
+ a1 := global asBinding: #Plonk.
+ a2 := global asBinding: #Nurp.
+ self assert: (a1 literalEqual: a2)
+ !

Item was added:
+ ----- Method: AliasTest>>testLiteralUnequal (in category 'tests') -----
+ testLiteralUnequal
+ | a1 a2 |
+ a1 := (#Giffle => value) asBinding: #Plonk.
+ a2 := (#Giffle => value) asBinding: #Plonk.
+ self deny: (a1 literalEqual: a2)
+ !

Item was changed:
  ----- Method: AliasTest>>testWrite (in category 'tests') -----
  testWrite
  | alias global |
+ global := #Giffle => Object new.
- global := #Giffle -> Object new.
  alias := Alias key: #Plonk source: global.
  alias value: value.
  self assert: global value == value.
  self assert: alias value == value.!

Item was removed:
- TestCase subclass: #BindingTest
- instanceVariableNames: 'key value'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Tests-Environments'!

Item was removed:
- ----- Method: BindingTest>>setUp (in category 'as yet unclassified') -----
- setUp
- key := Object new.
- value := Object new.!

Item was removed:
- ----- Method: BindingTest>>testAsBindingRead (in category 'as yet unclassified') -----
- testAsBindingRead
- | binding imported |
- binding := Binding key: #Griffle value: value.
- imported := binding asBinding: #Plonk.
- self assert: imported key = #Plonk.
- self assert: imported value == value.!

Item was removed:
- ----- Method: BindingTest>>testCanAssign (in category 'as yet unclassified') -----
- testCanAssign
- | binding |
- binding := Binding key: key value: value.
- self deny: binding canAssign!

Item was removed:
- ----- Method: BindingTest>>testIsSpecialRead (in category 'as yet unclassified') -----
- testIsSpecialRead
- | binding |
- binding := Binding key: key value: value.
- self deny: binding isSpecialReadBinding!

Item was removed:
- ----- Method: BindingTest>>testIsSpecialWrite (in category 'as yet unclassified') -----
- testIsSpecialWrite
- | binding |
- binding := Binding key: key value: value.
- self assert: binding isSpecialWriteBinding!

Item was removed:
- ----- Method: BindingTest>>testRead (in category 'as yet unclassified') -----
- testRead
- | binding |
- binding := Binding key: key value: value.
- self assert: binding key == key.
- self assert: binding value == value!

Item was removed:
- ----- Method: BindingTest>>testResumeExceptionToWrite (in category 'as yet unclassified') -----
- testResumeExceptionToWrite
- | binding |
- binding := Binding key: key value: Object new.
- [binding value: value]
- on: AttemptToWriteReadOnlyGlobal
- do: [:ex | ex resume: true].
- self assert: binding value == value!

Item was removed:
- ----- Method: BindingTest>>testWriteRaisesException (in category 'as yet unclassified') -----
- testWriteRaisesException
- | binding |
- binding := Binding key: key value: value.
- self
- should: [binding value: Object new]
- raise: AttemptToWriteReadOnlyGlobal.!

Item was added:
+ TestCase subclass: #ClassBindingTest
+ instanceVariableNames: 'key value'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: ClassBindingTest>>setUp (in category 'as yet unclassified') -----
+ setUp
+ key := Object new.
+ value := Object new.!

Item was added:
+ ----- Method: ClassBindingTest>>testArrowBinding (in category 'as yet unclassified') -----
+ testArrowBinding
+ | binding |
+ binding := #Griffle => self class.
+ self assert: binding class = ClassBinding.
+ self assert: binding key = #Griffle.
+ self assert: binding value = self class.
+ !

Item was added:
+ ----- Method: ClassBindingTest>>testAsBindingRead (in category 'as yet unclassified') -----
+ testAsBindingRead
+ | binding imported |
+ binding := ClassBinding key: #Griffle value: value.
+ imported := binding asBinding: #Plonk.
+ self assert: imported key = #Plonk.
+ self assert: imported value == value.!

Item was added:
+ ----- Method: ClassBindingTest>>testCanAssign (in category 'as yet unclassified') -----
+ testCanAssign
+ | binding |
+ binding := ClassBinding key: key value: value.
+ self deny: binding canAssign!

Item was added:
+ ----- Method: ClassBindingTest>>testIsSpecialRead (in category 'as yet unclassified') -----
+ testIsSpecialRead
+ | binding |
+ binding := ClassBinding key: key value: value.
+ self deny: binding isSpecialReadBinding!

Item was added:
+ ----- Method: ClassBindingTest>>testIsSpecialWrite (in category 'as yet unclassified') -----
+ testIsSpecialWrite
+ | binding |
+ binding := ClassBinding key: key value: value.
+ self assert: binding isSpecialWriteBinding!

Item was added:
+ ----- Method: ClassBindingTest>>testLiteralEqual (in category 'as yet unclassified') -----
+ testLiteralEqual
+ | b1 b2 |
+ b1 := #Griffle => self class.
+ b2 := #Plonk => self class.
+ self assert: (b1 literalEqual: b2)!

Item was added:
+ ----- Method: ClassBindingTest>>testLiteralUnequal (in category 'as yet unclassified') -----
+ testLiteralUnequal
+ | b1 b2 |
+ b1 := #Griffle => self class.
+ b2 := #Griffle => self class superclass.
+ self deny: (b1 literalEqual: b2)!

Item was added:
+ ----- Method: ClassBindingTest>>testRead (in category 'as yet unclassified') -----
+ testRead
+ | binding |
+ binding := ClassBinding key: key value: value.
+ self assert: binding key == key.
+ self assert: binding value == value!

Item was added:
+ ----- Method: ClassBindingTest>>testResumeExceptionToWrite (in category 'as yet unclassified') -----
+ testResumeExceptionToWrite
+ | binding |
+ binding := ClassBinding key: key value: Object new.
+ [binding value: value]
+ on: AttemptToWriteReadOnlyGlobal
+ do: [:ex | ex resume: true].
+ self assert: binding value == value!

Item was added:
+ ----- Method: ClassBindingTest>>testWriteRaisesException (in category 'as yet unclassified') -----
+ testWriteRaisesException
+ | binding |
+ binding := ClassBinding key: key value: value.
+ self
+ should: [binding value: Object new]
+ raise: AttemptToWriteReadOnlyGlobal.!

Item was changed:
+ AnObsoleteClassTestCase subclass: #EventManagerTest
- ClassTestCase subclass: #EventManagerTest
  instanceVariableNames: 'eventSource eventListener succeeded'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Tests-Object Events'!

Item was changed:
+ AnObsoleteClassTestCase subclass: #FileDirectoryTest
- ClassTestCase subclass: #FileDirectoryTest
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Tests-Files'!

Item was changed:
+ AnObsoleteClassTestCase subclass: #FileStreamTest
- ClassTestCase subclass: #FileStreamTest
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Tests-Files'!

Item was added:
+ ----- Method: GlobalTest>>testArrowBinding (in category 'as yet unclassified') -----
+ testArrowBinding
+ | binding |
+ binding := #Griffle => value.
+ self assert: binding class = Global.
+ self assert: binding key = #Griffle.
+ self assert: binding value == value!

Item was changed:
  ----- Method: GlobalTest>>testAsBindingRead (in category 'as yet unclassified') -----
  testAsBindingRead
  | global imported |
+ global := Global key: key value: value.
- global := Association key: key value: value.
  imported := global asBinding: #Griffle.
  self assert: imported key = #Griffle.
  self assert: imported value == value.
  !

Item was changed:
  ----- Method: GlobalTest>>testAsBindingWrite (in category 'as yet unclassified') -----
  testAsBindingWrite
  | global imported |
+ global := Global key: key value: Object new.
- global := Association key: key value: Object new.
  imported := global asBinding: #Griffle.
  imported value: value.
  self assert: imported value == value.
  !

Item was changed:
  ----- Method: GlobalTest>>testCanAssign (in category 'as yet unclassified') -----
  testCanAssign
  | global |
+ global := Global key: key value: value.
- global := Association key: key value: value.
  self assert: global canAssign!

Item was changed:
  ----- Method: GlobalTest>>testIsSpecialRead (in category 'as yet unclassified') -----
  testIsSpecialRead
  | global |
+ global := Global key: key value: value.
- global := Association key: key value: value.
  self deny: global isSpecialReadBinding!

Item was changed:
  ----- Method: GlobalTest>>testIsSpecialWrite (in category 'as yet unclassified') -----
  testIsSpecialWrite
  | global |
+ global := Global key: key value: value.
- global := Association key: key value: value.
  self deny: global isSpecialWriteBinding!

Item was added:
+ ----- Method: GlobalTest>>testLiteralEqual (in category 'as yet unclassified') -----
+ testLiteralEqual
+ | global |
+ global := #Griffle => value.
+ self assert: (global literalEqual: global)!

Item was added:
+ ----- Method: GlobalTest>>testLiteralUnequal (in category 'as yet unclassified') -----
+ testLiteralUnequal
+ | g1 g2 |
+ g1 := #Griffle => value.
+ g2 := #Griffle => value.
+ self deny: (g1 literalEqual: g2)!

Item was changed:
  ----- Method: GlobalTest>>testRead (in category 'as yet unclassified') -----
  testRead
  | global |
+ global := Global key: key value: value.
- global := Association key: key value: value.
  self assert: global key == key.
  self assert: global value == value.!

Item was changed:
  ----- Method: GlobalTest>>testWrite (in category 'as yet unclassified') -----
  testWrite
  | global |
+ global := Global key: key value: Object new.
- global := Association key: key value: Object new.
  global value: value.
  self assert: global value == value!

Item was added:
+ ----- Method: NamePolicyTest class>>isAbstract (in category 'as yet unclassified') -----
+ isAbstract
+ ^ self name = #NamePolicyTest!

Item was changed:
+ AnObsoleteClassTestCase subclass: #PrimCallControllerAbstractTest
- ClassTestCase subclass: #PrimCallControllerAbstractTest
  instanceVariableNames: 'pcc doNotMakeSlowTestsFlag'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Tests-PrimCallController'!
 
  !PrimCallControllerAbstractTest commentStamp: 'sr 6/15/2004 19:20' prior: 0!
  PrimCallController tests.
 
  Tests are here, but this class isAbstract and won't be tested.
  Tests are done in the subclasses, which inherit the tests here.
 
  If you want to perform some more very slow tests, change doNotMakeSlowTestsFlag in >>setUp.!

Item was changed:
+ AnObsoleteClassTestCase subclass: #SecureHashAlgorithmTest
- ClassTestCase subclass: #SecureHashAlgorithmTest
  instanceVariableNames: 'hash'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Tests-Digital Signatures'!
 
  !SecureHashAlgorithmTest commentStamp: '<historical>' prior: 0!
  This is the unit test for the class SecureHashAlgorithm. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see:
  - http://www.c2.com/cgi/wiki?UnitTest
  - http://minnow.cc.gatech.edu/squeak/1547
  - the sunit class category!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cwp.195.mcz

Frank Shearar-3
On 2 April 2013 07:13,  <[hidden email]> wrote:

> Colin Putney uploaded a new version of Tests to project The Trunk:
> http://source.squeak.org/trunk/Tests-cwp.195.mcz
>
> ==================== Summary ====================
>
> Name: Tests-cwp.195
> Author: cwp
> Time: 1 April 2013, 11:13:55.788 pm
> UUID: d0b0de68-7e72-4291-a7c2-e9b35372660f
> Ancestors: Tests-dtl.194
>
> Make environment tests use the new binding classes, add tests for #literalEqual:.
>
> =============== Diff against Tests-dtl.194 ===============
>

> Item was changed:
> + AnObsoleteClassTestCase subclass: #EventManagerTest
> - ClassTestCase subclass: #EventManagerTest

That's not right, surely? Did you base these changes on an image
updated past Eliot's moving of ClassTestCase to SUnit?

(They cause a debugger to pop up, talking about deprecated classes.
That will cause big issues for a CI environment.)

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cwp.195.mcz

Colin Putney-3



On Tue, Apr 2, 2013 at 3:06 AM, Frank Shearar <[hidden email]> wrote:
 
> Item was changed:
> + AnObsoleteClassTestCase subclass: #EventManagerTest
> - ClassTestCase subclass: #EventManagerTest

That's not right, surely? Did you base these changes on an image
updated past Eliot's moving of ClassTestCase to SUnit?

(They cause a debugger to pop up, talking about deprecated classes.
That will cause big issues for a CI environment.)

Argh. I wrestled with this for hours last night, and I thought I had finally gotten it right.

Yeah, that's clearly wrong.  Not sure how to fix it.

Colin


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cwp.195.mcz

Bert Freudenberg

On 02.04.2013, at 09:43, Colin Putney <[hidden email]> wrote:

>
>
>
> On Tue, Apr 2, 2013 at 3:06 AM, Frank Shearar <[hidden email]> wrote:
>  
> > Item was changed:
> > + AnObsoleteClassTestCase subclass: #EventManagerTest
> > - ClassTestCase subclass: #EventManagerTest
>
> That's not right, surely? Did you base these changes on an image
> updated past Eliot's moving of ClassTestCase to SUnit?
>
> (They cause a debugger to pop up, talking about deprecated classes.
> That will cause big issues for a CI environment.)
>
> Argh. I wrestled with this for hours last night, and I thought I had finally gotten it right.
>
> Yeah, that's clearly wrong.  Not sure how to fix it.

Well, simplest would be to delete the bad version from trunk, and try again.

- Bert -