[squeak-dev] The Trunk: NetworkTests-nice.12.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Mar 28 20:32:12 UTC 2010
Nicolas Cellier uploaded a new version of NetworkTests to project The Trunk:
http://source.squeak.org/trunk/NetworkTests-nice.12.mcz
==================== Summary ====================
Name: NetworkTests-nice.12
Author: nice
Time: 28 March 2010, 10:32:08.362 pm
UUID: a03700cf-6d76-41bf-81cd-88ee52e136dc
Ancestors: NetworkTests-nice.11
Replace some _ assignments
=============== Diff against NetworkTests-nice.11 ===============
Item was changed:
----- Method: TestURI classSide>>generateNormalResolverTests (in category 'test generation') -----
generateNormalResolverTests
"TestURI generateNormalResolverTests"
| relURIString result method testPairs pair |
+ testPairs := #(
- testPairs _ #(
#('g:h' 'g:h' )
#('g' 'http://a/b/c/g' )
#('./g' 'http://a/b/c/g' )
#('g/' 'http://a/b/c/g/' )
#('/g' 'http://a/g' )
#('//g' 'http://g' )
#('?y' 'http://a/b/c/?y' )
#('g?y' 'http://a/b/c/g?y' )
#('g#s' 'http://a/b/c/g#s' )
#('g?y#s' 'http://a/b/c/g?y#s' )
#(';x' 'http://a/b/c/;x' )
#('g;x' 'http://a/b/c/g;x' )
#('g;x?y#s' 'http://a/b/c/g;x?y#s' )
#('.' 'http://a/b/c/' )
#('./' 'http://a/b/c/' )
#('..' 'http://a/b/' )
#('../' 'http://a/b/' )
#('../g' 'http://a/b/g' )
#('../..' 'http://a/' )
#('../../' 'http://a/' )
#('../../g' 'http://a/g' )
).
1 to: testPairs size do: [:index |
+ pair := testPairs at: index.
+ relURIString := pair first.
+ result := pair last.
+ method := String streamContents: [:stream |
- pair _ testPairs at: index.
- relURIString _ pair first.
- result _ pair last.
- method _ String streamContents: [:stream |
stream nextPutAll: 'testResolveNormal' , index printString; cr.
stream
nextPutAll: ' | baseURI relURI resolvedURI |' ; cr;
+ nextPutAll: ' baseURI := ''http://a/b/c/d;p?q'' asURI.' ; cr;
+ nextPutAll: ' relURI := '; nextPut: $'; nextPutAll: relURIString; nextPutAll: '''.' ; cr;
+ nextPutAll: ' resolvedURI := baseURI resolveRelativeURI: relURI.' ; cr;
- nextPutAll: ' baseURI _ ''http://a/b/c/d;p?q'' asURI.' ; cr;
- nextPutAll: ' relURI _ '; nextPut: $'; nextPutAll: relURIString; nextPutAll: '''.' ; cr;
- nextPutAll: ' resolvedURI _ baseURI resolveRelativeURI: relURI.' ; cr;
nextPutAll: ' self should: [resolvedURI asString = '''; nextPutAll: result; nextPutAll: '''].' ; cr].
self compile: method classified: 'running resolving'].
!
Item was changed:
----- Method: TestURI classSide>>generateAbnormalResolverTests (in category 'test generation') -----
generateAbnormalResolverTests
"TestURI generateAbnormalResolverTests"
| relURIString result method testPairs pair |
+ testPairs := #(
- testPairs _ #(
#('../../../g' 'http://a/../g' )
#('../../../../g' 'http://a/../../g' )
#('/./g' 'http://a/./g' )
#('/../g' 'http://a/../g' )
#('g.' 'http://a/b/c/g.' )
#('.g' 'http://a/b/c/.g' )
#('g..' 'http://a/b/c/g..' )
#('..g' 'http://a/b/c/..g' )
#('./../g' 'http://a/b/g' )
#('./g/.' 'http://a/b/c/g/' )
#('g/./h' 'http://a/b/c/g/h' )
#('g/../h' 'http://a/b/c/h' )
#('g;x=1/./y' 'http://a/b/c/g;x=1/y' )
#('g;x=1/../y' 'http://a/b/c/y' )
#('g?y/./x' 'http://a/b/c/g?y/./x' )
#('g?y/../x' 'http://a/b/c/g?y/../x' )
#('g#s/./x' 'http://a/b/c/g#s/./x' )
#('g#s/../x' 'http://a/b/c/g#s/../x' )
).
1 to: testPairs size do: [:index |
+ pair := testPairs at: index.
+ relURIString := pair first.
+ result := pair last.
+ method := String streamContents: [:stream |
- pair _ testPairs at: index.
- relURIString _ pair first.
- result _ pair last.
- method _ String streamContents: [:stream |
stream nextPutAll: 'testResolveAbnormal' , index printString; cr.
stream
nextPutAll: ' | baseURI relURI resolvedURI |' ; cr;
+ nextPutAll: ' baseURI := ''http://a/b/c/d;p?q'' asURI.' ; cr;
+ nextPutAll: ' relURI := '; nextPut: $'; nextPutAll: relURIString; nextPutAll: '''.' ; cr;
+ nextPutAll: ' resolvedURI := baseURI resolveRelativeURI: relURI.' ; cr;
- nextPutAll: ' baseURI _ ''http://a/b/c/d;p?q'' asURI.' ; cr;
- nextPutAll: ' relURI _ '; nextPut: $'; nextPutAll: relURIString; nextPutAll: '''.' ; cr;
- nextPutAll: ' resolvedURI _ baseURI resolveRelativeURI: relURI.' ; cr;
nextPutAll: ' self should: [resolvedURI asString = '''; nextPutAll: result; nextPutAll: '''].' ; cr].
self compile: method classified: 'running resolving'].
!
More information about the Squeak-dev
mailing list
|