rename std words to be UPPER CASE (ugh)
add initial unittests for std words (more to do)
git-svn-id: http://skia.googlecode.com/svn/trunk@347 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/forth/SampleForth.cpp b/forth/SampleForth.cpp
index 3de2fad..2877fb6 100644
--- a/forth/SampleForth.cpp
+++ b/forth/SampleForth.cpp
@@ -150,6 +150,8 @@
///////////////////////////////////////////////////////////////////////////////
+void Forth_test_stdwords();
+
class ForthView : public SkView {
ForthEnv fEnv;
ForthWord* fOnClickWord;
@@ -158,6 +160,8 @@
SkForthCtx fContext;
public:
ForthView() {
+ Forth_test_stdwords();
+
load_words(&fEnv, &fContext);
fBM.setConfig(SkBitmap::kARGB_8888_Config, 640, 480);
@@ -165,7 +169,7 @@
fBM.eraseColor(0);
fContext.init(fBM);
- fEnv.parse(": mycolor ( x. y. -- x. y. ) rot rot f< IF #FFFF0000 ELSE #FF0000FF THEN setColor ;");
+ fEnv.parse(": mycolor ( x. y. -- x. y. ) OVER OVER f< IF #FFFF0000 ELSE #FF0000FF THEN setColor ;");
fEnv.parse(": view.onClick ( x. y. -- ) mycolor 10. drawCircle ;");
fOnClickWord = fEnv.findWord("view.onClick");
#if 0