summaryrefslogtreecommitdiffstats
path: root/kjsembed/tests/test_size.js
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/tests/test_size.js')
-rw-r--r--kjsembed/tests/test_size.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/kjsembed/tests/test_size.js b/kjsembed/tests/test_size.js
new file mode 100644
index 00000000..511b3530
--- /dev/null
+++ b/kjsembed/tests/test_size.js
@@ -0,0 +1,22 @@
+
+var w = 25;
+var h = 25;
+
+var size = new Size(w,h);
+var size2 = new Size();
+size2.setHeight(size.height());
+size2.setWidth(size.width());
+
+if( size.width() != w )
+{
+ println( "W not "+ w +" " + size.width());
+ exit(1);
+}
+
+if( size.height() != h )
+{
+ println( "H not "+ h +" " + size.height());
+ exit(1);
+}
+
+println( "All tests passed");