[Wheat-cvs] r1/root/library compiler.ws,1.1,1.2
Status: Pre-Alpha
Brought to you by:
mark_lentczner
From: Jim K. <ki...@us...> - 2005-06-03 22:54:23
|
Update of /cvsroot/wheat/r1/root/library In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7291/root/library Modified Files: compiler.ws Log Message: Relative paths in prototype now get absolutified when object is created. Mounts now have an initialize method, so XMLMedia reads in the file when we call initialize, not in the constructor (that is, after it is mounted into the tree). Index: compiler.ws =================================================================== RCS file: /cvsroot/wheat/r1/root/library/compiler.ws,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- compiler.ws 5 May 2005 17:42:25 -0000 1.1 +++ compiler.ws 3 Jun 2005 22:54:14 -0000 1.2 @@ -71,4 +71,22 @@ #assert-error("system/vm/exception/not-found(++)", error); } + point2d: { x: 5; y: 6 } +`` absolute: { :'/library/compiler/tests/point2d': } + relative: { :point2d: } + + test-prototype(): { + point2d := $point2d.absolute-path.as-string; +`` #assert-equals(point2d, $absolute.prototype().as-string); + #assert-equals(point2d, $relative.prototype().as-string); + copy := $relative; + #assert-equals(point2d, copy.prototype().as-string); + } + + test-inheritance(): { + #assert-equals(5, $relative.x); + copy := $relative; + #assert-equals(5, copy.x); + } + } |