[Pkg] The Trunk: Tests-nice.144.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Feb 22 21:00:04 UTC 2012


Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.144.mcz

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

Name: Tests-nice.144
Author: nice
Time: 22 February 2012, 4:02:34.454 am
UUID: 2402a040-f271-47c1-881d-d6fddf0d6e7d
Ancestors: Tests-nice.143

Add some tests for Compiler notifications
- do we get the right notification ?
- inserted at the right place in text ?

This is an unfinished work with expected failures.
But absolutely necessary to solve issues like http://code.google.com/p/pharo/issues/detail?id=3439

=============== Diff against Tests-nice.143 ===============

Item was added:
+ TestCase subclass: #CompilerNotifyingTest
+ 	instanceVariableNames: 'text morph expectedErrors expectedErrorPositions failure'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tests-Compiler'!
+ 
+ !CompilerNotifyingTest commentStamp: 'nice 2/21/2012 23:55' prior: 0!
+ A CompilerNotifyingTest is a TestCase for checking that Compiler/Parser notifications are inserted at the right place in a TextEditor.
+ 
+ Instance Variables
+ 	expectedErrorPositions:		<Array of: Integer>
+ 	expectedErrors:		<Array of: String>
+ 	failure:		<Object>
+ 	morph:		<TextMorph>
+ 	text:		<String>
+ 
+ errorPositions
+ 	- the position where error text should be inserted for each chunk of text evaluated
+ 
+ errors
+ 	- the error text that should be inserted on evaluation of each chunk of text evaluated
+ 
+ failure
+ 	- an object returned in case of evaluation error and whose identity can be uniquely recognized as a failure
+ 	
+ morph
+ 	- the Morph holding the text
+ 	
+ text
+ 	- the string containing all the chunks to be evaluated (separated by %)
+ 	  and the expected error messages (`enclosed in back quotes`)
+ 	  this text will be stripped of the error messages before being evaluated.
+ 
+ !

Item was added:
+ ----- Method: CompilerNotifyingTest class>>lastStoredRun (in category 'history') -----
+ lastStoredRun
+ 	^ ((Dictionary new) add: (#failures->((Set new) add: #testTooManyArguments; add: #testifTrueBlockWithArgument; add: #testMissingArgumentAfterAMessageKey; add: #testTooManyLiterals; add: #testAlltogether; add: #testUnmatchedLocalTempDeclarationInABlock; add: #testUnmatchedExpressionParenthesis; add: #testCaseOtherwiseBlockWithArgument; yourself)); add: (#errors->((Set new) add: #testTooManyTemporaries; yourself)); add: (#passed->((Set new) add: #testUnmatchedBraceArray; add: #testTooLargeAnIntegerInALiteralByteArray; add: #testDigitTooLargeForARadix; add: #testInvalidLiteralCharacter; add: #testAssignmentOfSelf; add: #testInvalidPrimitive; add: #testInvalidExternalFunctionDeclaration; add: #testMissingExpressionAfterAReturn; add: #testInvalidRadix; add: #testMissingArgumentAfterABinaryMessage; add: #testMissingPeriodSeparatorBetweenStatements; add: #testCascadeInASuperSend; add: #testATempShadowingAnotherTemp; add: #testExtraneousStatementAfterAReturnInABlock; add: #testLiteralCharacterMissing; add: #testUnmatchedCommentQuote; add: #testInvalidPattern; add: #testUnmatchedByteArrayBracket; add: #testUnmatchedLiteralParenthesis; add: #testUnmatchedLocalTempDeclaration; add: #testExpectedExpressionInBraceArray; add: #testInvalidPragma; add: #testMissingSeparatorBetweenBlockArgumentAndStatements; add: #testMissingBlockArgumentName; add: #testMissingMessageAfterACascade; add: #testUnmatchedStringQuote; add: #testTempDoubledDefined; add: #testMissingExpression; add: #testUnmatchedBlockBracket; add: #testEmptyCaseStatement; yourself)); add: (#timeStamp->'22 February 2012 3:52:10 am' asTimeStamp); yourself)!

Item was added:
+ ----- Method: CompilerNotifyingTest>>enumerateAllSelections (in category 'private') -----
+ enumerateAllSelections
+ 	1 to: self numberOfSelections do: [:n |
+ 		self assert: (self evaluateSelectionNumber: n) == failure.
+ 		self assert: ((expectedErrors at: n) = morph editor selection asString).
+ 		self assert: ((expectedErrorPositions at: n) = morph editor startIndex).
+ 		morph editor cut].!

Item was added:
+ ----- Method: CompilerNotifyingTest>>evaluateSelection (in category 'private') -----
+ evaluateSelection
+ 	^(nil class evaluatorClass new)
+ 		evaluate: morph editor selectionAsStream
+ 		in: nil
+ 		to: nil
+ 		notifying: morph editor
+ 		ifFail: [^failure]
+ 		logged: false
+ 	!

Item was added:
+ ----- Method: CompilerNotifyingTest>>evaluateSelectionNumber: (in category 'private') -----
+ evaluateSelectionNumber: n
+ 	| i start stop |
+ 	i := start := 1.
+ 	[stop := morph text indexOf: $% startingAt: start + 1 ifAbsent: morph text size + 1.
+ 	i = n]
+ 		whileFalse:
+ 			[i := i + 1.
+ 			start := stop + 1].
+ 	morph editor selectFrom: start to: stop - 1.
+ 	^self evaluateSelection
+ 	!

Item was added:
+ ----- Method: CompilerNotifyingTest>>initializeTextWithoutError (in category 'initialize-release') -----
+ initializeTextWithoutError
+ 	"Remove the errors from the text to be compiled and answer the text without errors.
+ 	Meanwhile, collect the expected error messages and their expected position."
+ 
+ 	| input output errorStream positionStream |
+ 	input := text readStream.
+ 	output := (String new: text size) writeStream.
+ 	errorStream := (Array new: self numberOfSelections) writeStream.
+ 	positionStream := (Array new: self numberOfSelections) writeStream.
+ 	
+ 	[output nextPutAll: (input upTo: $`).
+ 	input atEnd]
+ 		whileFalse:
+ 			[positionStream nextPut: output position + 1.
+ 			errorStream nextPut: (input upTo: $`)].
+ 	expectedErrors := errorStream contents.
+ 	expectedErrorPositions := positionStream contents.
+ 	^output contents!

Item was added:
+ ----- Method: CompilerNotifyingTest>>numberOfSelections (in category 'private') -----
+ numberOfSelections
+ 	^(text occurrencesOf: $%) + 1!

Item was added:
+ ----- Method: CompilerNotifyingTest>>setUp (in category 'initialize-release') -----
+ setUp
+ 	failure := Object new.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>setUpForErrorsIn: (in category 'initialize-release') -----
+ setUpForErrorsIn: aTextWithErrorsEnclosedInBackQuote
+ 	"Extract the expectedErrors, the expectedErrorPositions and set up a TextMorph containing the text without errors.
+ 	each section separated by % in aTextWithErrorsEnclosedInBackQuote will be evaluated separately.
+ 	The expected error message should lie in aTextWithErrorsEnclosedInBackQuote at the expected position, and enclosed in back quotes."
+ 	text := aTextWithErrorsEnclosedInBackQuote.
+ 	morph := TextMorph new contents: self initializeTextWithoutError asText.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testATempShadowingAnotherTemp (in category 'testing') -----
+ testATempShadowingAnotherTemp
+ 	self setUpForErrorsIn: '| x | x := 1. ^[ | ` Name is already defined ->`x | x ]'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testAlltogether (in category 'testing') -----
+ testAlltogether
+ 	"Initialize for all known error conditions.
+ 	Note that the chunk to be evaluated are separated by %, and expected errors enclosed in back quotes."
+ 	
+ 	self setUpForErrorsIn: '  "First, the senders of #offEnd:"
+ #` Unmatched bracket ->`[ 1 2 %
+ #[ 1 2 ` 8-bit integer or right bracket expected ->`256 4]%
+ $` A Character was expected ->`%
+ 1+2   ` Unmatched comment quote ->`"unfinished comment%
+ #` Unmatched parenthesis ->`( 1 2%
+ #` Unmatched parenthesis ->`( 1 2 %
+ ^nil printString ,  ` Unmatched string quote ->`''unfinished string%
+ 	"Then, the senders of #expected:"
+ 2r` a digit between 0 and 1 expected ->`3%
+ | x | x := ` Expression expected ->`%
+ [ :x : ` Argument name expected ->`1]%
+ [ :x ` Vertical bar expected ->`x + 1 ]%
+ [:x | 1 ` Period or right bracket expected ->`( 1 ) ]%
+ { 1. 2` Period or right brace expected ->`%
+ { 1. 2 ` Period or right brace expected ->`%
+ { 1. 2 ` Period or right brace expected ->`3 %
+ { 1. 2. ` Variable or expression expected ->`| x | %
+ super yourself` Cascading not expected ->`; yourself
+ nil yourself; ` Cascade expected ->`^ 2%
+ 	"#externalFunctionDeclaration is skipped, this cannot be evaluated"
+ 1 to: ` Argument expected ->`:=%
+ 1 +` Argument expected ->`%
+ 1 + ` Argument expected ->`* 2 + 3%
+ 1+(2 ` right parenthesis expected ->`.  %
+ 1 + 2 ` Nothing more expected ->`^nil%
+ 	"#pattern:inContext: skipped, cannot be evaluated"
+ 	"#pragmaLiteral: #pragmaSequence #pragmaStatement skipped, cannot be evaluated"
+ (  ` expression expected ->`. 2  . )%
+ ( 1  ` right parenthesis expected ->`. 2  . )%
+ 	"#primitive:error: #primitive:module:error: skipped, cannot be evaluated"
+ ^ ` Expression to return expected ->`. 1 + 2%
+ [ ^1 ` End of block expected ->`2]%
+ | x y ` Vertical bar expected ->`%
+ [:z | | x y ` Vertical bar expected ->`]%
+ 1` an integer greater than 1 as valid radix expected ->`r0'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testAssignmentOfSelf (in category 'testing') -----
+ testAssignmentOfSelf
+ 	self setUpForErrorsIn: '` Cannot store into ->`self := 1. ^self'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testCascadeInASuperSend (in category 'testing') -----
+ testCascadeInASuperSend
+ 	self setUpForErrorsIn: 'super yourself` Cascading not expected ->`; yourself'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testCaseOtherwiseBlockWithArgument (in category 'testing-block arguments') -----
+ testCaseOtherwiseBlockWithArgument
+ 	self setUpForErrorsIn: 'nil caseOf: { [nil] -> [1] } otherwise: [:x` <- otherwise arg of caseOf:otherwise: has too many arguments ->` | 2 ]. ^nil '.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testDigitTooLargeForARadix (in category 'testing') -----
+ testDigitTooLargeForARadix
+ 	self setUpForErrorsIn: '2r` a digit between 0 and 1 expected ->`3'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testEmptyCaseStatement (in category 'testing') -----
+ testEmptyCaseStatement
+ 	self setUpForErrorsIn: '^ nil caseOf: { ` At least one case required ->`} '.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testExpectedExpressionInBraceArray (in category 'testing') -----
+ testExpectedExpressionInBraceArray
+ 	self setUpForErrorsIn: '{ 1. 2 ` Period or right brace expected ->`3 }'.
+ 	self enumerateAllSelections.
+ 	self setUpForErrorsIn: '{ 1. 2. ` Variable or expression expected ->`| x | x}'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testExtraneousStatementAfterAReturnInABlock (in category 'testing') -----
+ testExtraneousStatementAfterAReturnInABlock
+ 	self setUpForErrorsIn: '[ ^1 ` End of block expected ->`2]'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testInvalidExternalFunctionDeclaration (in category 'testing') -----
+ testInvalidExternalFunctionDeclaration
+ 	"Not implemented yet.
+ 	#externalFunctionDeclaration skipped, cannot be evaluated"!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testInvalidLiteralCharacter (in category 'testing') -----
+ testInvalidLiteralCharacter
+ 	self setUpForErrorsIn: '^ #yourself , #` Invalid literal character ->`) , #end'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testInvalidPattern (in category 'testing') -----
+ testInvalidPattern
+ 	"Not implemented yet.
+ 	#pattern:inContext: skipped, cannot be evaluated"!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testInvalidPragma (in category 'testing') -----
+ testInvalidPragma
+ 	"Not implemented yet.
+ 	#pragmaLiteral: #pragmaSequence #pragmaStatement #pragmaPrimitives skipped, cannot be evaluated"!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testInvalidPrimitive (in category 'testing') -----
+ testInvalidPrimitive
+ 	"Not implemented yet.
+ 	##primitive:error: #primitive:module:error: skipped, cannot be evaluated"!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testInvalidRadix (in category 'testing') -----
+ testInvalidRadix
+ 	self setUpForErrorsIn: '1` an integer greater than 1 as valid radix expected ->`r0'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testLiteralCharacterMissing (in category 'testing') -----
+ testLiteralCharacterMissing
+ 	self setUpForErrorsIn: '$` A Character was expected ->`'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testMissingArgumentAfterABinaryMessage (in category 'testing') -----
+ testMissingArgumentAfterABinaryMessage
+ 	self setUpForErrorsIn: '1 +` Argument expected ->`'.
+ 	self enumerateAllSelections.
+ 	self setUpForErrorsIn: '1 + ` Argument expected ->`* 2 + 3'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testMissingArgumentAfterAMessageKey (in category 'testing') -----
+ testMissingArgumentAfterAMessageKey
+ 	self setUpForErrorsIn: '1 to: ` Argument expected ->`:='.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testMissingBlockArgumentName (in category 'testing') -----
+ testMissingBlockArgumentName
+ 	self setUpForErrorsIn: '[ :x : ` Argument name expected ->`1]'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testMissingExpression (in category 'testing') -----
+ testMissingExpression
+ 	self setUpForErrorsIn: '| x | x := ` Expression expected ->'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testMissingExpressionAfterAReturn (in category 'testing') -----
+ testMissingExpressionAfterAReturn
+ 	self setUpForErrorsIn: '^ ` Expression to return expected ->`. 1 + 2'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testMissingMessageAfterACascade (in category 'testing') -----
+ testMissingMessageAfterACascade
+ 	self setUpForErrorsIn: 'nil yourself; ` Cascade expected ->`^ 2'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testMissingPeriodSeparatorBetweenStatements (in category 'testing') -----
+ testMissingPeriodSeparatorBetweenStatements
+ 	self setUpForErrorsIn: '1 + 2 ` Nothing more expected ->`^nil'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testMissingSeparatorBetweenBlockArgumentAndStatements (in category 'testing') -----
+ testMissingSeparatorBetweenBlockArgumentAndStatements
+ 	self setUpForErrorsIn: '[ :x ` Vertical bar expected ->`x + 1 ]'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testTempDoubledDefined (in category 'testing') -----
+ testTempDoubledDefined
+ 	self setUpForErrorsIn: '| x ` Name is already defined ->`x | x := 1. ^x'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testTooLargeAnIntegerInALiteralByteArray (in category 'testing') -----
+ testTooLargeAnIntegerInALiteralByteArray
+ 	self setUpForErrorsIn: '#[ 1 2 ` 8-bit integer or right bracket expected ->`256 4 5]'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testTooManyArguments (in category 'testing-byteCode limits') -----
+ testTooManyArguments
+ 	self setUpForErrorsIn: '^[:x1 :x2 :x3 :x4 :x5 :x6 :x7 :x8 :x9 :x10 :x11 :x12 :x13 :x14 :x15 ` Too many arguments ->`:x16 :x17 | ]'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testTooManyLiterals (in category 'testing-byteCode limits') -----
+ testTooManyLiterals
+ 	self setUpForErrorsIn: '{#(1). #(2). #(3). #(4). #(5). #(6). #(7). #(8). #(9). #(10). #(11). #(12). #(13). #(14). #(15). #(16). #(17). #(18). #(19). #(20). #(21). #(22). #(23). #(24). #(25). #(26). #(27). #(28). #(29). #(30). #(31). #(32). #(33). #(34). #(35). #(36). #(37). #(38). #(39). #(40). #(41). #(42). #(43). #(44). #(45). #(46). #(47). #(48). #(49). #(50). #(51). #(52). #(53). #(54). #(55). #(56). #(57). #(58). #(59). #(60). #(61). #(62). #(63). #(64). #(65). #(66). #(67). #(68). #(69). #(70). #(71). #(72). #(73). #(74). #(75). #(76). #(77). #(78). #(79). #(80). #(81). #(82). #(83). #(84). #(85). #(86). #(87). #(88). #(89). #(90). #(91). #(92). #(93). #(94). #(95). #(96). #(97). #(98). #(99). #(100). #(101). #(102). #(103). #(104). #(105). #(106). #(107). #(108). #(109). #(110). #(111). #(112). #(113). #(114). #(115). #(116). #(117). #(118). #(119). #(120). #(121). #(122). #(123). #(124). #(125). #(126). #(127). #(128). #(129). #(130). #(131). #(132). #(133). #(134). #(135). #(136). #(137). #(138). #(139). #(140). #(141). #(142). #(143). #(144). #(145). #(146). #(147). #(148). #(149). #(150). #(151). #(152). #(153). #(154). #(155). #(156). #(157). #(158). #(159). #(160). #(161). #(162). #(163). #(164). #(165). #(166). #(167). #(168). #(169). #(170). #(171). #(172). #(173). #(174). #(175). #(176). #(177). #(178). #(179). #(180). #(181). #(182). #(183). #(184). #(185). #(186). #(187). #(188). #(189). #(190). #(191). #(192). #(193). #(194). #(195). #(196). #(197). #(198). #(199). #(200). #(201). #(202). #(203). #(204). #(205). #(206). #(207). #(208). #(209). #(210). #(211). #(212). #(213). #(214). #(215). #(216). #(217). #(218). #(219). #(220). #(221). #(222). #(223). #(224). #(225). #(226). #(227). #(228). #(229). #(230). #(231). #(232). #(233). #(234). #(235). #(236). #(237). #(238). #(239). #(240). #(241). #(242). #(243). #(244). #(245). #(246). #(247). #(248). #(249). #(250). #(251). #(252). #(253). #(254). #(255). #(256). `More than 256 literals referenced. 
+ You must split or otherwise simplify this method.
+ The 257th literal is: ->`#(257)}'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testTooManyTemporaries (in category 'testing-byteCode limits') -----
+ testTooManyTemporaries
+ 	self setUpForErrorsIn: '| x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x40 x41 x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59 x60 x61 x62 x63 ` Too many temporaries ->`x64 x65 |
+ 	x1 := x2 := x3 := x4 := x5 := x6 := x7 := x8 := x9 := x10 := x11 := x12 := x13 := x14 := x15 := x16 := x17 := x18 := x19 := x20 := x21 := x22 := x23 := x24 := x25 := x26 := x27 := x28 := x29 := x30 := x31 := x32 := x33 := x34 := x35 := x36 := x37 := x38 := x39 := x40 := x41 := x42 := x43 := x44 := x45 := x46 := x47 := x48 := x49 := x50 := x51 := x52 := x53 := x54 := x55 := x56 := x57 := x58 := x59 := x60 := x61 := x62 := x63 := x64 := x65 := 0.
+ 	{x1. x2. x3. x4. x5. x6. x7. x8. x9. x10. x11. x12. x13. x14. x15. x16. x17. x18. x19. x20. x21. x22. x23. x24. x25. x26. x27. x28. x29. x30. x31. x32. x33. x34. x35. x36. x37. x38. x39. x40. x41. x42. x43. x44. x45. x46. x47. x48. x49. x50. x51. x52. x53. x54. x55. x56. x57. x58. x59. x60. x61. x62. x63. x64. x65}'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedBlockBracket (in category 'testing') -----
+ testUnmatchedBlockBracket
+ 	self setUpForErrorsIn: 'nil yourself. [` Period or right bracket expected ->`'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedBraceArray (in category 'testing') -----
+ testUnmatchedBraceArray
+ 	self setUpForErrorsIn: '{ 1. 2` Period or right brace expected ->`'.
+ 	self enumerateAllSelections.
+ 	self setUpForErrorsIn: '{ 1. 2 ` Period or right brace expected ->`'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedByteArrayBracket (in category 'testing') -----
+ testUnmatchedByteArrayBracket
+ 	self setUpForErrorsIn: '#` Unmatched bracket ->`[ 1 2 '.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedCommentQuote (in category 'testing') -----
+ testUnmatchedCommentQuote
+ 	self setUpForErrorsIn: '1+2   ` Unmatched comment quote ->`"unfinished comment'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedExpressionParenthesis (in category 'testing') -----
+ testUnmatchedExpressionParenthesis
+ 	self setUpForErrorsIn: '1+(2 ` right parenthesis expected ->`. '.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedLiteralParenthesis (in category 'testing') -----
+ testUnmatchedLiteralParenthesis
+ 	self setUpForErrorsIn: '#` Unmatched parenthesis ->`( 1 2'.
+ 	self enumerateAllSelections.
+ 	self setUpForErrorsIn: '#` Unmatched parenthesis ->`( 1 2 '.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedLocalTempDeclaration (in category 'testing') -----
+ testUnmatchedLocalTempDeclaration
+ 	self setUpForErrorsIn: '| x y ` Vertical bar expected ->`'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedLocalTempDeclarationInABlock (in category 'testing') -----
+ testUnmatchedLocalTempDeclarationInABlock
+ 	self setUpForErrorsIn: '[:z | | x y ` Vertical bar expected ->`]'.
+ 	self enumerateAllSelections.!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testUnmatchedStringQuote (in category 'testing') -----
+ testUnmatchedStringQuote
+ 	self setUpForErrorsIn: '^nil printString ,  ` Unmatched string quote ->`''unfinished string'.
+ 	self enumerateAllSelections!

Item was added:
+ ----- Method: CompilerNotifyingTest>>testifTrueBlockWithArgument (in category 'testing-block arguments') -----
+ testifTrueBlockWithArgument
+ 	self setUpForErrorsIn: 'true ifTrue: [:x` <- argument of ifTrue: has too many arguments ->` | 1 + 1 ]'.
+ 	self enumerateAllSelections.
+ 	self setUpForErrorsIn: 'true ifTrue: [:x` <- argument of ifTrue: has too many arguments ->` :y | 1 + 1 ]'.
+ 	self enumerateAllSelections.!



More information about the Packages mailing list