Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: test/mjsunit/harmony/typesystem/simple-types.js

Issue 1817353003: Add tests for variable declarations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-types 5 // Flags: --harmony-types
6 6
7 7
8 load("test/mjsunit/harmony/typesystem/typegen.js"); 8 load("test/mjsunit/harmony/typesystem/typegen.js");
9 9
10 10
11 // In all the following functions, the size parameter (positive integer) 11 // In all the following functions, the size parameter (positive integer)
12 // denotes how many test cases will be tried. The variable test_size 12 // denotes how many test cases will be tried. The variable test_size
13 // controls execution time of this test. It should not be too high. 13 // controls execution time of this test. It should not be too high.
14 let test_size = 1000; 14 let test_size = 1000;
15 15
16 16
17 (function TestPrimaryTypes(size) { 17 (function TestPrimaryTypes(size) {
18 Test(size, [ 18 Test(size, [
19 new TestGen(4, ValidPrimaryTypes, [CheckValid], true), 19 new TestGen(4, ValidPrimaryTypes, [CheckValidType], true),
20 new TestGen(1, InvalidPrimaryTypes, [CheckInvalid], true) 20 new TestGen(1, InvalidPrimaryTypes, [CheckInvalidType], true)
21 ]); 21 ]);
22 })(test_size); 22 })(test_size);
23 23
24 24
25 (function TestIntersectionTypes(size) { 25 (function TestIntersectionTypes(size) {
26 Test(size, [ 26 Test(size, [
27 new TestGen(4, ValidIntersectionTypes, [CheckValid], true), 27 new TestGen(4, ValidIntersectionTypes, [CheckValidType], true),
28 new TestGen(1, InvalidIntersectionTypes, [CheckInvalid], true) 28 new TestGen(1, InvalidIntersectionTypes, [CheckInvalidType], true)
29 ]); 29 ]);
30 })(test_size); 30 })(test_size);
31 31
32 32
33 (function TestUnionTypes(size) { 33 (function TestUnionTypes(size) {
34 Test(size, [ 34 Test(size, [
35 new TestGen(4, ValidUnionTypes, [CheckValid], true), 35 new TestGen(4, ValidUnionTypes, [CheckValidType], true),
36 new TestGen(1, InvalidUnionTypes, [CheckInvalid], true) 36 new TestGen(1, InvalidUnionTypes, [CheckInvalidType], true)
37 ]); 37 ]);
38 })(test_size); 38 })(test_size);
39 39
40 40
41 (function TestFunctionAndConstructorTypes(size) { 41 (function TestFunctionAndConstructorTypes(size) {
42 Test(size, [ 42 Test(size, [
43 new TestGen(4, ValidFunctionTypes, [CheckValid], false), 43 new TestGen(4, ValidFunctionTypes, [CheckValidType], false),
44 new TestGen(1, InvalidFunctionTypes, [CheckInvalid], false), 44 new TestGen(1, InvalidFunctionTypes, [CheckInvalidType], false),
45 new TestGen(4, ValidFunctionTypes, [CheckValid], true), 45 new TestGen(4, ValidFunctionTypes, [CheckValidType], true),
46 new TestGen(1, InvalidFunctionTypes, [CheckInvalid], true) 46 new TestGen(1, InvalidFunctionTypes, [CheckInvalidType], true)
47 ]); 47 ]);
48 })(test_size); 48 })(test_size);
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/typesystem/object-types.js ('k') | test/mjsunit/harmony/typesystem/string-literal-types.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698