[squeak-dev] The Inbox: Tests.quasiliteral-eem.296.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 4 20:43:11 UTC 2014


Eliot Miranda uploaded a new version of Tests to project The Inbox:
http://source.squeak.org/inbox/Tests.quasiliteral-eem.296.mcz

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

Name: Tests.quasiliteral-eem.296
Author: eem
Time: 4 May 2014, 1:43:00.087 pm
UUID: af518e90-5c11-4582-9611-e46d26bdd5ff
Ancestors: Tests-cwp.295, Tests.quasiquote-eem.189

Renamed from the bogus quasiquote to quasiliteral.
Added Balazs' errors as failing tests.

=============== Diff against Tests-cwp.295 ===============

Item was added:
+ TestCase subclass: #QuasiLiteralTest
+ 	instanceVariableNames: 'foo bar baz'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tests-Compiler'!
+ 
+ !QuasiLiteralTest commentStamp: 'eem 5/4/2014 12:00' prior: 0!
+ QuasiLiteralTest tests the quasi-literal facility which provides variable interpolation in string literals.
+ 
+ Instance Variables
+ 	bar:		<String>
+ 	baz:	<String>
+ 	foo:		<String>
+ 
+ bar
+ 	- a string literal
+ 
+ baz
+ 	- a string literal
+ 
+ foo
+ 	- a string literal
+ !

Item was added:
+ ----- Method: QuasiLiteralTest>>testBalazsErrors (in category 'tests') -----
+ testBalazsErrors
+ 	self assert: (self evaluate: '`[1] [2]`') equals: '1 2'.
+ 	self assert: (self evaluate: '`[1] [2] value]`') equals: '1 2 value]'.
+ 	self assert: (self evaluate: '`[1] [2] value`') equals: '1 2 value'.!

Item was added:
+ ----- Method: QuasiLiteralTest>>testSimpleString (in category 'tests') -----
+ testSimpleString
+ 	self assert: { 'hello world!!' } concatenateQuasiLiteral equals: 'hello world!!'.
+ 	self shouldnt: [Parser new parse: '`hello world!!`' readStream class: nil class noPattern: true notifying: nil ifFail: [Error signal]]
+ 		raise: SyntaxErrorNotification, Error.
+ 	self shouldnt: [self evaluate: '`hello world!!`']
+ 		raise: SyntaxErrorNotification, Error.
+ 	self assert: (self evaluate: '`hello world!!`') equals: 'hello world!!'.
+ 
+ 	self assert: { 'hello '. #cruel. ' world!!' } concatenateQuasiLiteral equals: 'hello cruel world!!'.
+ 	self shouldnt: [Parser new parse: '`hello [#cruel] world!!`' readStream class: nil class noPattern: true notifying: nil ifFail: [Error signal]]
+ 		raise: SyntaxErrorNotification, Error.
+ 	self shouldnt: [self evaluate: '`hello [#cruel] world!!`']
+ 		raise: SyntaxErrorNotification, Error.
+ 	self assert: (self evaluate: '`hello [#cruel] world!!`') equals: 'hello cruel world!!'.
+ 
+ 	self assert: (self evaluate: '`''hello world!!''`') equals: '''hello world!!'''.!



More information about the Squeak-dev mailing list