jvanzyl 01/01/06 14:07:09
Modified: test test.properties
test/templates map.vm
test/templates/compare map.cmp
Added: test/templates get.vm
test/templates/compare get.cmp
Log:
- adding a test for the new ability of velocity to use a get(key)
method of an object that doesn't implememnt the Map interface.
This will be much more convenient. You can now just whack a
get(key) method in any object and vel will find it. Vel was
once like this and it probably should have stayed that way.
Revision Changes Path
1.22 +1 -0 jakarta-velocity/test/test.properties
Index: test.properties
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/test.properties,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- test.properties 2000/12/28 16:23:13 1.21
+++ test.properties 2001/01/06 22:07:07 1.22
@@ -34,3 +34,4 @@
test.template.32 = ifstatement
test.template.33 = math
test.template.34 = range
+test.template.35 = get
1.2 +0 -6 jakarta-velocity/test/templates/map.vm
Index: map.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/map.vm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- map.vm 2000/12/15 17:19:42 1.1
+++ map.vm 2001/01/06 22:07:08 1.2
@@ -9,12 +9,6 @@
*#
-## $provider is a valid context object but
-## Muck is not a valid property. This was causing
-## ClassCastException which is now being caught.
-
-$provider.Muck
-
## This is a valid Map and Bar is a valid
## element.
1.1 jakarta-velocity/test/templates/get.vm
Index: get.vm
===================================================================
#*
@test get.vm
This template is used for Velocity regression testing.
If you alter this template make sure you change the
corresponding comparison file so that the regression
test doesn't fail incorrectly.
*#
## Now the provider has been outfitted with
## a get(key) method so it will just return
## the key when asked for it.
$provider.Muck
$provider.Duck
$provider.Truck
1.2 +0 -3 jakarta-velocity/test/templates/compare/map.cmp
Index: map.cmp
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/compare/map.cmp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- map.cmp 2000/12/15 17:19:45 1.1
+++ map.cmp 2001/01/06 22:07:08 1.2
@@ -1,7 +1,4 @@
-$provider.Muck
-
-
this is from a hashtable!
1.1 jakarta-velocity/test/templates/compare/get.cmp
Index: get.cmp
===================================================================
Muck
Duck
Truck