OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 7957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7968 NULL}; | 7968 NULL}; |
7969 RunParserSyncTest(sloppy_context_data, valid_data, kSuccess, NULL, 0, | 7969 RunParserSyncTest(sloppy_context_data, valid_data, kSuccess, NULL, 0, |
7970 always_flags, arraysize(always_flags)); | 7970 always_flags, arraysize(always_flags)); |
7971 RunParserSyncTest(strict_context_data, valid_data, kError, NULL, 0, | 7971 RunParserSyncTest(strict_context_data, valid_data, kError, NULL, 0, |
7972 always_flags, arraysize(always_flags)); | 7972 always_flags, arraysize(always_flags)); |
7973 RunModuleParserSyncTest(strict_context_data, valid_data, kError, NULL, 0, | 7973 RunModuleParserSyncTest(strict_context_data, valid_data, kError, NULL, 0, |
7974 always_flags, arraysize(always_flags)); | 7974 always_flags, arraysize(always_flags)); |
7975 } | 7975 } |
7976 | 7976 |
7977 | 7977 |
7978 TEST(MiscSyntaxErrors) { | 7978 TEST(MiscSyntaxErrors) { |
adamk
2016/02/01 23:15:59
Not sure this test makes any sense, some grouping
caitp (gmail)
2016/02/01 23:19:38
I was just getting rid of ones that weren't quite
| |
7979 // clang-format off | |
7979 const char* context_data[][2] = { | 7980 const char* context_data[][2] = { |
7980 {"'use strict'", ""}, {"", ""}, {NULL, NULL}}; | 7981 { "'use strict'", "" }, |
7981 const char* error_data[] = {"for (();;) {}", NULL}; | 7982 { "", "" }, |
7983 { NULL, NULL } | |
7984 }; | |
7985 | |
7986 const char* error_data[] = { | |
7987 "for (();;) {}", | |
7988 | |
7989 // crbug.com/582626 | |
7990 "{ NaN ,chA((evarA=new t ( l = !.0[((... co -a0([1]))=> greturnkf", | |
7991 | |
7992 // Simplified case: | |
7993 "(...rest - a) => b", | |
adamk
2016/02/01 23:15:59
Please add a test for the multi-arg version too (t
caitp (gmail)
2016/02/01 23:19:37
Acknowledged.
| |
7994 NULL | |
7995 }; | |
7996 // clang-format on | |
7982 | 7997 |
7983 RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0); | 7998 RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0); |
7984 } | 7999 } |
OLD | NEW |