Skip to content

Commit 3828cbb

Browse files
author
Sebastian Höfer
committed
Updated test files
1 parent ec92551 commit 3828cbb

File tree

14 files changed

+50
-19
lines changed

14 files changed

+50
-19
lines changed

src/test/resources/scripts/class/class3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Class with methods (prototype)
33
*/
44

5-
class Polygon extends Object {
5+
class Polygon {
66

77
constructor(hoehe, breite) {
88
this.hoehe = hoehe;

src/test/resources/scripts/class/class5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Classes with polymorphism (extends)
33
*/
44

5-
class Tier{
5+
class Tier {
66
constructor(name) {
77
this.name = name;
88
}

src/test/resources/scripts/function/function1.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
Creates function within a function.
3+
*/
4+
15
function pow(base, exp) {
26

37
var ret = base;
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
function def(a = () => 5 ){return a();}
1+
/*
2+
Function using arrow function in parameter list.
3+
*/
4+
5+
function def(a = () => 5 )
6+
{
7+
return a();
8+
}
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
/*
2+
Function to express the fully qualified name based difference of a global and local scope in the model.
3+
*/
14
function localScope(){
2-
var x = 5;
5+
var x = "Local Scope";
36
return NULL
7+
48
}
5-
var x = "FileScope";
9+
var x = "Global scope";

src/test/resources/scripts/function/function4.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*
2+
Function with a parameter list which consists of three numbers (x,y,z), a string (str) and an object with an key called name.
3+
*/
14
function longSignatureFunction(x,y,z,str,obj){
25
var sum = x + y + z;
36
var stmt = "Hello" + str + "!";
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
Function with a very short signature (parameter list).
3+
*/
4+
15
function veryShortSignature(x){
26
return x;
37
}

src/test/resources/scripts/function/function6.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
Function which invokes a second function right above. Finally we determine the degree celsius out of 500 degree Fahrenheit.
3+
*/
4+
15
function answer(x){
26
return "\"The temperature is " + x + " Celsius";
37
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
var car = "Fiat";
2-
var vars = ["Saab", "Volvo", car];
2+
var cars = ["Saab", "Volvo", car];

src/test/resources/scripts/object/object3.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)