{"ScriptPreparationCode":null,"TestCases":[{"Name":"ES6 Class","Code":"class Point {\r\n\tconstructor(x, y){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n }\r\n\r\n\tadd(point){\r\n\t\treturn new Point(this.x \u002B point.x, this.y \u002B point.y);\r\n }\r\n\r\n\tsub(point){\r\n\t\treturn new Point(this.x - point.x, this.y - point.y);\r\n }\r\n \r\n \ttoFloat32Array(){\r\n return new Float32Array([this.x,this.y])\r\n }\r\n}\r\n\r\nvar p1 = new Point(10, 10);\r\nvar p2 = new Point(10, -10);\r\nvar sum = p1.add(p2);\r\nvar dif = p1.sub(p2);\r\nvar f32 = p1.toFloat32Array();","IsDeferred":false},{"Name":"Function float32array","Code":"function create_point(x,y){\r\n return new Float32Array([ x , y ]);\r\n}\r\n\r\nfunction add_points(a,b){\r\n return new Float32Array( [ a[0] \u002B b[0] , a[1] \u002B b[1] ] );\r\n}\r\nfunction sub_points(a,b){\r\n return new Float32Array( [ a[0] - b[0] , a[1] - b[1] ] );\r\n}\r\n\r\nvar p1 = create_point(10,10);\r\nvar p2 = create_point(10,-10);\r\nvar sum = add_points(p1,p2);\r\nvar dif = sub_points(p1,p2);\r\nvar f32 = p1","IsDeferred":false},{"Name":"Function array","Code":"function create_point(x,y){\r\n return [ x , y ];\r\n}\r\n\r\nfunction add_points(a,b){\r\n return [ a[0] \u002B b[0] , a[1] \u002B b[1] ];\r\n}\r\nfunction sub_points(a,b){\r\n return [ a[0] - b[0] , a[1] - b[1] ];\r\n}\r\nfunction to_32(a){\r\n return new Float32Array(a);\r\n}\r\n\r\nvar p1 = create_point(10,10);\r\nvar p2 = create_point(10,-10);\r\nvar sum = add_points(p1,p2);\r\nvar dif = sub_points(p1,p2);\r\nvar f32 = to_32(p1);","IsDeferred":false}]}