From 91b918804556ee9603845a06cbcf9bac2224006f Mon Sep 17 00:00:00 2001 From: pur3mail Date: Thu, 22 Dec 2011 15:31:19 +0000 Subject: [PATCH] Deleted extra tests, as have now updated original tests so they are properly javascript compliant - thanks Armin! --- tests/test008.42.js | 8 -------- tests/test014.42.js | 17 ----------------- tests/test017.42.js | 15 --------------- tests/test018.42.js | 21 --------------------- tests/test023.42.js | 8 -------- 5 files changed, 69 deletions(-) delete mode 100644 tests/test008.42.js delete mode 100644 tests/test014.42.js delete mode 100644 tests/test017.42.js delete mode 100644 tests/test018.42.js delete mode 100644 tests/test023.42.js diff --git a/tests/test008.42.js b/tests/test008.42.js deleted file mode 100644 index 29f0e28..0000000 --- a/tests/test008.42.js +++ /dev/null @@ -1,8 +0,0 @@ -// functions in variables -// 42-tiny-js change begin ---> -//var bob; // in JavaScript it's not allowed to add a child to a var with type "undefined" -var bob = {}; -//<--- 42-tiny-js change end -bob.add = function(x,y) { return x+y; }; - -result = bob.add(3,6)==9; diff --git a/tests/test014.42.js b/tests/test014.42.js deleted file mode 100644 index 7f2fec3..0000000 --- a/tests/test014.42.js +++ /dev/null @@ -1,17 +0,0 @@ -// Variable creation and scope from http://en.wikipedia.org/wiki/JavaScript_syntax -x = 0; // A global variable -var y = 'Hello!'; // Another global variable -// 42-tiny-js change begin ---> -z = 0; // a var is only created automated by assignment -//<--- 42-tiny-js change end -function f(){ - var z = 'foxes'; // A local variable - twenty = 20; // Global because keyword var is not used - return x; // We can use x here because it is global -} -// The value of z is no longer available - - -// testing -blah = f(); -result = blah==0 && z!='foxes' && twenty==20; diff --git a/tests/test017.42.js b/tests/test017.42.js deleted file mode 100644 index 923d0e7..0000000 --- a/tests/test017.42.js +++ /dev/null @@ -1,15 +0,0 @@ -// references for arrays - -// 42-tiny-js change begin ---> -//var a; // in JavaScript it's not allowed to add properies to a var with type "undefined" -var a = []; -//<--- 42-tiny-js change end - -a[0] = 10; -a[1] = 22; - -b = a; - -b[0] = 5; - -result = a[0]==5 && a[1]==22 && b[1]==22; diff --git a/tests/test018.42.js b/tests/test018.42.js deleted file mode 100644 index fbebb4e..0000000 --- a/tests/test018.42.js +++ /dev/null @@ -1,21 +0,0 @@ -// references with functions - -var a = 42; -// 42-tiny-js change begin ---> -//var b; // in JavaScript it's not allowed to add properties to a var with type "undefined" -var b = []; -//<--- 42-tiny-js change end -b[0] = 43; - -function foo(myarray) { - myarray[0]++; -} - -function bar(myvalue) { - myvalue++; -} - -foo(b); -bar(a); - -result = a==42 && b[0]==44; diff --git a/tests/test023.42.js b/tests/test023.42.js deleted file mode 100644 index b0ecb14..0000000 --- a/tests/test023.42.js +++ /dev/null @@ -1,8 +0,0 @@ -// mikael.kindborg@mobilesorcery.com - Function symbol is evaluated in bracket-less body of false if-statement -// 42-tiny-js change begin ---> -var foo; // a var is only created automated by assignment -//<--- 42-tiny-js change end - -if (foo !== undefined) foo(); - -result = 1;