@@ -445,99 +445,6 @@ BlockClosureTest >> testSetUp [
445445 self assert: (aBlock method isNil or : [ aBlock method isKindOf: CompiledCode ])
446446]
447447
448- { #category : 'tests' }
449- BlockClosureTest >> testSupplyAnswerOfFillInTheBlank [
450-
451- self
452- assert:
453- ([ ProvideAnswerNotification signal: 'Your favorite color?' ]
454- valueSupplyingAnswer: #( 'Your favorite color?'
455- 'blue' ))
456- equals: 'blue'
457- ]
458-
459- { #category : 'tests' }
460- BlockClosureTest >> testSupplyAnswerOfFillInTheBlankUsingDefaultAnswer [
461-
462- self
463- assert: ([
464- (ProvideAnswerNotification signal: 'Your favorite color?')
465- == #default ifTrue: [ 'red' ] ] valueSupplyingAnswer:
466- #( 'Your favorite color?' #default ))
467- equals: 'red'
468- ]
469-
470- { #category : 'tests' }
471- BlockClosureTest >> testSupplyAnswerThroughNestedBlocks [
472-
473- self should: [true = ([[self confirm: 'You like Smalltalk?']
474- valueSupplyingAnswer: #('Blub' false)] valueSupplyingAnswer: #('Smalltalk' true))]
475- ]
476-
477- { #category : 'tests' }
478- BlockClosureTest >> testSupplyAnswerUsingOnlySubstringOfQuestion [
479-
480- self should: [false = ([self confirm: 'You like Smalltalk?']
481- valueSupplyingAnswer: #('like' false))]
482- ]
483-
484- { #category : 'tests' }
485- BlockClosureTest >> testSupplyAnswerUsingRegexMatchOfQuestion [
486-
487- (String includesSelector: #matchesRegex:) ifFalse: [^ self].
488-
489- self should: [true = ([self confirm: 'You like Smalltalk?']
490- valueSupplyingAnswer: #('.*Smalltalk\?' true))]
491- ]
492-
493- { #category : 'tests' }
494- BlockClosureTest >> testSupplyAnswerUsingTraditionalMatchOfQuestion [
495-
496- self should: [true = ([self confirm: 'You like Smalltalk?']
497- valueSupplyingAnswer: #('*Smalltalk#' true))]
498- ]
499-
500- { #category : 'tests' }
501- BlockClosureTest >> testSupplySameAnswerToAllQuestions [
502-
503- self should: [true = ([self confirm: 'You like Smalltalk?'] valueSupplyingAnswer: true)].
504-
505- self should: [#(true true) = ([{self confirm: 'One'. self confirm: 'Two'}] valueSupplyingAnswer: true)]
506- ]
507-
508- { #category : 'tests' }
509- BlockClosureTest >> testSupplySeveralAnswersToSeveralQuestions [
510-
511- self should: [#(false true) = ([{self confirm: 'One'. self confirm: 'Two'}]
512- valueSupplyingAnswers: #( ('One' false) ('Two' true) ))].
513-
514- self should: [#(true false) = ([{self confirm: 'One'. self confirm: 'Two'}]
515- valueSupplyingAnswers: #( ('One' true) ('Two' false) ))]
516- ]
517-
518- { #category : 'tests' }
519- BlockClosureTest >> testSupplySpecificAnswerToQuestion [
520-
521- self should: [false = ([self confirm: 'You like Smalltalk?']
522- valueSupplyingAnswer: #('You like Smalltalk?' false))]
523- ]
524-
525- { #category : 'tests' }
526- BlockClosureTest >> testSuppressInform [
527-
528- self should: [[nil inform: 'Should not see this message or this test failed!'] valueSuppressingAllMessages isNil]
529- ]
530-
531- { #category : 'tests' }
532- BlockClosureTest >> testSuppressInformUsingStringMatchOptions [
533-
534- self should: [([nil inform: 'Should not see this message or this test failed!'] valueSuppressingMessages: #('Should not see this message or this test failed!')) isNil].
535-
536- self should: [([nil inform: 'Should not see this message or this test failed!'] valueSuppressingMessages: #('not see this message')) isNil].
537-
538- self should: [([nil inform: 'Should not see this message or this test failed!'] valueSuppressingMessages: #('*message*failed#')) isNil]
539- ]
540-
541448{ #category : ' tests - evaluating' }
542449BlockClosureTest >> testValueWithArguments [
543450
0 commit comments