# HG changeset patch # User Jan Vrany # Date 1278054797 -3600 # Node ID 479c4d02ad58da52fcd9fe8436a7007eeec28edf # Parent 762eb3e60c17503a2e09d6601689a3e7a2a27473 Selector namespaces tests rewritten, classes renamed. diff -r 762eb3e60c17 -r 479c4d02ad58 MethodOverrideTests.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MethodOverrideTests.st Fri Jul 02 08:13:17 2010 +0100 @@ -0,0 +1,61 @@ +'From Smalltalk/X, Version:6.1.1 on 02-07-2010 at 08:40:49 AM' ! + +"{ Package: 'stx:libbasic' }" + +TestCase subclass:#MethodOverrideTests + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'Kernel-Tests' +! + + +!MethodOverrideTests methodsFor:'initialization & release'! + +tearDown + + #(methodToBeOverriden_1) do: + [:sel| + (self respondsTo: sel) ifTrue: + [self class removeSelector: sel]]. + + "Created: / 17-06-2009 / 19:36:10 / Jan Vrany " +! ! + +!MethodOverrideTests methodsFor:'tests'! + +test_01 + + | oldMethod newMethod | + '"{ Package: ''stx:libbasic'' }" + !! + !!MethodOverridesTest methodsFor:''mock methods''!! + + methodToBeOverriden_1 + ^0 + !! !!' readStream fileIn. + oldMethod := self class compiledMethodAt:#methodToBeOverriden_1. + self assert: self methodToBeOverriden_1 = 0. + + + '"{ Package: ''stx:goodies/sunit'' }" + !! + !!MethodOverridesTest methodsFor:''mock methods''!! + + methodToBeOverriden_1 + ^1 + !! !!' readStream fileIn. + + self assert: self methodToBeOverriden_1 = 1. + newMethod := self class compiledMethodAt:#methodToBeOverriden_1. + + self assert: newMethod overridenMethod == oldMethod. + + "Created: / 17-06-2009 / 19:27:23 / Jan Vrany " +! ! + +!MethodOverrideTests class methodsFor:'documentation'! + +version + ^'$Id$' +! ! diff -r 762eb3e60c17 -r 479c4d02ad58 MethodOverridesTest.st --- a/MethodOverridesTest.st Thu Jul 01 20:50:00 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -"{ Package: 'stx:libbasic' }" - -TestCase subclass:#MethodOverridesTest - instanceVariableNames:'' - classVariableNames:'' - poolDictionaries:'' - category:'Kernel-Tests' -! - - -!MethodOverridesTest methodsFor:'initialization & release'! - -tearDown - - #(methodToBeOverriden_1) do: - [:sel| - (self respondsTo: sel) ifTrue: - [self class removeSelector: sel]]. - - "Created: / 17-06-2009 / 19:36:10 / Jan Vrany " -! ! - -!MethodOverridesTest methodsFor:'tests'! - -test_01 - - | oldMethod newMethod | - '"{ Package: ''stx:libbasic'' }" - !! - !!MethodOverridesTest methodsFor:''mock methods''!! - - methodToBeOverriden_1 - ^0 - !! !!' readStream fileIn. - oldMethod := self class compiledMethodAt:#methodToBeOverriden_1. - self assert: self methodToBeOverriden_1 = 0. - - - '"{ Package: ''stx:goodies/sunit'' }" - !! - !!MethodOverridesTest methodsFor:''mock methods''!! - - methodToBeOverriden_1 - ^1 - !! !!' readStream fileIn. - - self assert: self methodToBeOverriden_1 = 1. - newMethod := self class compiledMethodAt:#methodToBeOverriden_1. - - self assert: newMethod overridenMethod == oldMethod. - - "Created: / 17-06-2009 / 19:27:23 / Jan Vrany " -! ! - -!MethodOverridesTest class methodsFor:'documentation'! - -version - ^'$Id$' -! ! diff -r 762eb3e60c17 -r 479c4d02ad58 SelectorNamespacesTest.st --- a/SelectorNamespacesTest.st Thu Jul 01 20:50:00 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -" - COPYRIGHT (c) 2006 by eXept Software AG - All Rights Reserved - - This software is furnished under a license and may be used - only in accordance with the terms of that license and with the - inclusion of the above copyright notice. This software may not - be provided or otherwise made available to, or used by, any - other person. No title to or ownership of the software is - hereby transferred. -" -"{ Package: 'stx:libbasic' }" - -TestCase subclass:#SelectorNamespacesTest - instanceVariableNames:'' - classVariableNames:'' - poolDictionaries:'' - category:'Kernel-Tests' -! - -!SelectorNamespacesTest class methodsFor:'documentation'! - -copyright -" - COPYRIGHT (c) 2006 by eXept Software AG - All Rights Reserved - - This software is furnished under a license and may be used - only in accordance with the terms of that license and with the - inclusion of the above copyright notice. This software may not - be provided or otherwise made available to, or used by, any - other person. No title to or ownership of the software is - hereby transferred. -" -! ! - -!SelectorNamespacesTest methodsFor:'initialization & release'! - -tearDown - - (self class >> #m1) - lookupObject: nil; - setAnnotations: nil. - (self class >> #call_m1) - lookupObject: nil; - setAnnotations: nil. - - "Created: / 20-05-2010 / 11:27:55 / Jan Vrany " -! ! - -!SelectorNamespacesTest methodsFor:'methods'! - -call_m1 - - ^self m1 - - "Created: / 20-05-2010 / 11:25:17 / Jan Vrany " -! - -m1 - - ^#m1 - - "Created: / 20-05-2010 / 11:25:07 / Jan Vrany " -! ! - -!SelectorNamespacesTest methodsFor:'tests'! - -test_01a - - self assert: self m1 == #m1. - self assert: self call_m1 == #m1. - - - (self class >> #call_m1) nameSpace: (NameSpace name: #'SelectorNamespace'). - - self assert: self m1 == #m1. - self assert: self call_m1 == #m1. - - (self class >> #m1) nameSpace: (NameSpace name: #'SelectorNamespace2'). - - self assert: self m1 == #m1. - self should: [self call_m1 == #m1] raise: Object messageNotUnderstoodSignal. - - "Created: / 20-05-2010 / 11:28:40 / Jan Vrany " -! ! - -!SelectorNamespacesTest class methodsFor:'documentation'! - -version_SVN - ^ '$Id: SelectorNamespacesTest.st 10524 2010-05-20 13:35:23Z vranyj1 $' -! ! diff -r 762eb3e60c17 -r 479c4d02ad58 SelectorNamespacesTests.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SelectorNamespacesTests.st Fri Jul 02 08:13:17 2010 +0100 @@ -0,0 +1,57 @@ +'From Smalltalk/X, Version:6.1.1 on 02-07-2010 at 08:40:49 AM' ! + +TestCase subclass:#SelectorNamespacesTests + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'Kernel-Tests' +! + +!SelectorNamespacesTests methodsFor:'initialization'! + +setUp + + ObjectMemory flushCaches + + "Created: / 01-07-2010 / 18:49:23 / Jan Vrany " +! ! + +!SelectorNamespacesTests methodsFor:'methods'! + +foo + + + ^#bar + + "Created: / 01-07-2010 / 18:09:55 / Jan Vrany " + "Modified: / 01-07-2010 / 20:46:39 / Jan Vrany " +! + +foo + + ^#foo + + "Created: / 01-07-2010 / 18:09:55 / Jan Vrany " + "Modified: / 01-07-2010 / 20:46:39 / Jan Vrany " +! + +qux + + + + ^self foo + + "Created: / 01-07-2010 / 18:47:50 / Jan Vrany " +! ! + +!SelectorNamespacesTests methodsFor:'tests'! + +test_01 + + self assert: self foo == #foo. + self assert: self qux == #bar + + "Created: / 01-07-2010 / 18:47:18 / Jan Vrany " + "Modified: / 01-07-2010 / 20:54:03 / Jan Vrany " +! ! + diff -r 762eb3e60c17 -r 479c4d02ad58 abbrev.stc --- a/abbrev.stc Thu Jul 01 20:50:00 2010 +0100 +++ b/abbrev.stc Fri Jul 02 08:13:17 2010 +0100 @@ -84,7 +84,7 @@ Magnitude Magnitude stx:libbasic 'Magnitude-General' 0 MappedExternalBytes MappedExternalBytes stx:libbasic 'System-Support' 0 Message Message stx:libbasic 'Kernel-Methods' 0 -MethodOverridesTest MethodOverridesTest stx:libbasic 'Kernel-Tests' 0 +MethodOverrideTests tMethodOverrideTests stx:libbasic 'Kernel-Tests' 0 MetaNumber MetaNumber stx:libbasic 'Magnitude-Numbers' 0 MiniDebugger MiniDebugger stx:libbasic 'System-Debugging-Support' 0 MiniInspector MiniInspector stx:libbasic 'System-Debugging-Support' 0 @@ -372,6 +372,6 @@ Lookup Lookup stx:libbasic 'Kernel-Classes' 0 OSProcess OSProcess stx:libbasic 'System-Support' 0 BuiltinLookup BuiltinLookup stx:libbasic 'Kernel-Classes' 0 -SelectorNamespacesTest SelectorNamespacesTest stx:libbasic 'Kernel-Tests' 4 +SelectorNamespacesTests SelectorNamespacesTests stx:libbasic 'Kernel-Tests' 4 Annotation Annotation stx:libbasic 'Kernel-Extensions' 0 NamespaceAwareLookup NamespaceAwareLookup stx:libbasic 'Kernel-Extensions' 0 diff -r 762eb3e60c17 -r 479c4d02ad58 stx_libbasic.st --- a/stx_libbasic.st Thu Jul 01 20:50:00 2010 +0100 +++ b/stx_libbasic.st Fri Jul 02 08:13:17 2010 +0100 @@ -203,7 +203,7 @@ Magnitude (MappedExternalBytes autoload) Message - (MethodOverridesTest autoload) + (MethodOverrideTests autoload) (MetaNumber autoload) MiniDebugger MiniInspector @@ -491,7 +491,7 @@ Lookup OSProcess BuiltinLookup - (SelectorNamespacesTest autoload) + (SelectorNamespacesTests autoload) Annotation NamespaceAwareLookup ) @@ -533,13 +533,13 @@ "Return a SVN revision number of myself. This number is updated after a commit" - ^ "$SVN-Revision:"'10533M'"$" + ^ "$SVN-Revision:"'10535M'"$" ! ! !stx_libbasic class methodsFor:'documentation'! version - ^ '$Id: stx_libbasic.st 10534 2010-07-01 18:21:34Z vranyj1 $' + ^ '$Id: stx_libbasic.st 10536 2010-07-02 07:13:17Z vranyj1 $' ! version_CVS @@ -547,7 +547,7 @@ ! version_SVN - ^ '$Id: stx_libbasic.st 10534 2010-07-01 18:21:34Z vranyj1 $' + ^ '$Id: stx_libbasic.st 10536 2010-07-02 07:13:17Z vranyj1 $' ! !