--- a/RegressionTests__BehaviorLookupObjectTests.st Tue Apr 06 10:12:58 2010 +0200
+++ b/RegressionTests__BehaviorLookupObjectTests.st Wed Apr 07 17:14:29 2010 +0200
@@ -30,6 +30,13 @@
privateIn:BehaviorLookupObjectTests
!
+Object subclass:#NilReturningLookupClass
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:BehaviorLookupObjectTests
+!
+
!BehaviorLookupObjectTests methodsFor:'helpers'!
@@ -95,32 +102,37 @@
testLookupObject_02
"/ check lookupObject with 2.. arguments
- ClassWithSpecialLookup setLookupObject:LookupClass.
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
self should:[ ClassWithSpecialLookup new x:1234 ] raise:MessageNotUnderstood.
- ClassWithSpecialLookup setLookupObject:LookupClass.
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
self should:[ ClassWithSpecialLookup new a1:1 a2:2] raise:MessageNotUnderstood.
-"/ ClassWithSpecialLookup setLookupObject:LookupClass.
-"/ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3] raise:MessageNotUnderstood.
-"/
-"/ ClassWithSpecialLookup setLookupObject:LookupClass.
-"/ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4] raise:MessageNotUnderstood.
-"/
-"/ ClassWithSpecialLookup setLookupObject:LookupClass.
-"/ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5] raise:MessageNotUnderstood.
-"/
-"/ ClassWithSpecialLookup setLookupObject:LookupClass.
-"/ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6] raise:MessageNotUnderstood.
-"/
-"/ ClassWithSpecialLookup setLookupObject:LookupClass.
-"/ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7] raise:MessageNotUnderstood.
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3] raise:MessageNotUnderstood.
+
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4] raise:MessageNotUnderstood.
+
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5] raise:MessageNotUnderstood.
+
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6] raise:MessageNotUnderstood.
+
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7] raise:MessageNotUnderstood.
+
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ self should:[ ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8] raise:MessageNotUnderstood.
!
testLookupObject_02c
|rslt|
"/ catch it, and proceed with a method...
+
+ "/ 1 arg...
MessageNotUnderstood handle:[:ex |
self assert:(ex suspendedContext selector == #doesNotUnderstand:).
self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
@@ -131,8 +143,459 @@
ObjectMemory flushInlineCaches.
rslt := ClassWithSpecialLookup new x:1234
].
+ self assert:(rslt = 98765).
+ "/ 2 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2
+ ].
self assert:(rslt = 98765).
+
+ "/ 3 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 4 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 5 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 6 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 7 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 8 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 9 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 10 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 11 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 12 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11 l:12
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 13 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11 l:12 m:13
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 14 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11 l:12 m:13 n:14
+ ].
+ self assert:(rslt = 98765).
+
+ "/ 15 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #lookupMethodForMessage:to:from:).
+ "/ here, we return a method...
+ ex proceedWith:(self class compiledMethodAt:#returnConstant98765).
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:BadLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11 l:12 m:13 n:14 o:15
+ ].
+ self assert:(rslt = 98765).
+!
+
+testLookupObject_02d
+ |rslt|
+
+ "/ lookup returns nil (for dnu); catch it, and proceed with a value...
+
+ "/ 1 arg...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #x:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new x:1234
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 2 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 3 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 4 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 5 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 6 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 7 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 8 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:h:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 9 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:h:i:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 10 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:h:i:j:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 11 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:h:i:j:k:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 12 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:h:i:j:k:l:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11 l:12
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 13 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:h:i:j:k:l:m:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11 l:12 m:13
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 14 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:h:i:j:k:l:m:n:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11 l:12 m:13 n:14
+ ].
+ self assert:(rslt = 6666).
+
+ "/ 15 args...
+ MessageNotUnderstood handle:[:ex |
+ self assert:(ex suspendedContext selector == #doesNotUnderstand:).
+ self assert:(ex suspendedContext sender selector == #a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:).
+ "/ here, we return a value...
+ ex proceedWith:6666.
+ ] do:[
+ ClassWithSpecialLookup setLookupObject:NilReturningLookupClass.
+ ObjectMemory flushInlineCaches.
+ rslt := ClassWithSpecialLookup new a:1 b:2 c:3 d:4 e:5 f:6 g:7 h:8 i:9 j:10 k:11 l:12 m:13 n:14 o:15
+ ].
+ self assert:(rslt = 6666).
+!
+
+testLookupObject_03
+ "/ check good lookupObject with 0.. arguments
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self assert:( ClassWithSpecialLookup new x ) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self assert:( ClassWithSpecialLookup new x:1234 ) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8 a9:9) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8 a9:9 a10:10) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8 a9:9 a10:10 a11:11) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8 a9:9 a10:10 a11:11 a12:12) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8 a9:9 a10:10 a11:11 a12:12 a13:13) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8 a9:9 a10:10 a11:11 a12:12 a13:13 a14:14) = 12345.
+
+ ClassWithSpecialLookup setLookupObject:LookupClass.
+ self should:( ClassWithSpecialLookup new a1:1 a2:2 a3:3 a4:4 a5:5 a6:6 a7:7 a8:8 a9:9 a10:10 a11:11 a12:12 a13:13 a14:14 a15:15) = 12345.
+! !
+
+!BehaviorLookupObjectTests::LookupClass class methodsFor:'lookup'!
+
+lookupMethodForMessage:msg to:receiver from:sendingContext
+ ^ self compiledMethodAt:#returnConstant12345
+! !
+
+!BehaviorLookupObjectTests::LookupClass methodsFor:'trap methods'!
+
+returnConstant12345
+ ^ 12345
+! !
+
+!BehaviorLookupObjectTests::NilReturningLookupClass class methodsFor:'lookup'!
+
+lookupMethodForMessage:msg to:receiver from:sendingContext
+ ^ nil
! !
!BehaviorLookupObjectTests class methodsFor:'documentation'!