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 7989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8000 "for (();;) {}", | 8000 "for (();;) {}", |
8001 | 8001 |
8002 // crbug.com/582626 | 8002 // crbug.com/582626 |
8003 "{ NaN ,chA((evarA=new t ( l = !.0[((... co -a0([1]))=> greturnkf", | 8003 "{ NaN ,chA((evarA=new t ( l = !.0[((... co -a0([1]))=> greturnkf", |
8004 NULL | 8004 NULL |
8005 }; | 8005 }; |
8006 // clang-format on | 8006 // clang-format on |
8007 | 8007 |
8008 RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0); | 8008 RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0); |
8009 } | 8009 } |
8010 | |
8011 TEST(FunctionSentErrors) { | |
8012 // clang-format off | |
8013 const char* context_data[][2] = { | |
8014 { "'use strict'", "" }, | |
8015 { "", "" }, | |
8016 { NULL, NULL } | |
8017 }; | |
8018 const char* error_data[] = { | |
8019 "var x = function.sent", | |
8020 "function* g() { yield function.s\\u0065nt; }" | |
8021 }; | |
adamk
2016/02/16 22:21:55
Think you'll need a NULL here.
| |
8022 // clang-format on | |
8023 | |
8024 bool old_flag = i::FLAG_harmony_function_sent; | |
8025 i::FLAG_harmony_function_sent = true; | |
adamk
2016/02/16 22:21:55
Hmm, I suspect this is supposed to have an allow_*
caitp (gmail)
2016/02/16 22:23:48
yeah, I'll add the parser flag accessors in a sepa
| |
8026 RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0); | |
8027 i::FLAG_harmony_function_sent = old; | |
8028 } | |
8029 | |
8030 TEST(NewTargetErrors) { | |
8031 // clang-format off | |
8032 const char* context_data[][2] = { | |
8033 { "'use strict'", "" }, | |
8034 { "", "" }, | |
8035 { NULL, NULL } | |
8036 }; | |
8037 const char* error_data[] = { | |
8038 "var x = new.target", | |
8039 "function f() { return new.t\\u0061rget; }" | |
8040 }; | |
adamk
2016/02/16 22:21:55
And a NULL here too
| |
8041 // clang-format on | |
8042 RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0); | |
adamk
2016/02/16 22:21:55
You can leave off the last four arguments in a cas
| |
8043 } | |
OLD | NEW |