OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 CHECK_PARSE_EQ("[x]", "[x]"); | 166 CHECK_PARSE_EQ("[x]", "[x]"); |
167 CHECK_PARSE_EQ("[xyz]", "[x y z]"); | 167 CHECK_PARSE_EQ("[xyz]", "[x y z]"); |
168 CHECK_PARSE_EQ("[a-zA-Z0-9]", "[a-z A-Z 0-9]"); | 168 CHECK_PARSE_EQ("[a-zA-Z0-9]", "[a-z A-Z 0-9]"); |
169 CHECK_PARSE_EQ("[-123]", "[- 1 2 3]"); | 169 CHECK_PARSE_EQ("[-123]", "[- 1 2 3]"); |
170 CHECK_PARSE_EQ("[^123]", "^[1 2 3]"); | 170 CHECK_PARSE_EQ("[^123]", "^[1 2 3]"); |
171 CHECK_PARSE_EQ("]", "']'"); | 171 CHECK_PARSE_EQ("]", "']'"); |
172 CHECK_PARSE_EQ("}", "'}'"); | 172 CHECK_PARSE_EQ("}", "'}'"); |
173 CHECK_PARSE_EQ("[a-b-c]", "[a-b - c]"); | 173 CHECK_PARSE_EQ("[a-b-c]", "[a-b - c]"); |
174 CHECK_PARSE_EQ("[\\d]", "[0-9]"); | 174 CHECK_PARSE_EQ("[\\d]", "[0-9]"); |
175 CHECK_PARSE_EQ("[x\\dz]", "[x 0-9 z]"); | 175 CHECK_PARSE_EQ("[x\\dz]", "[x 0-9 z]"); |
176 CHECK_PARSE_EQ("[\\d-z]", "[0-9 - z]"); | |
177 CHECK_PARSE_EQ("[\\d-\\d]", "[0-9 - 0-9]"); | |
178 CHECK_PARSE_EQ("[z-\\d]", "[z - 0-9]"); | |
179 CHECK_PARSE_EQ("\\cj\\cJ\\ci\\cI\\ck\\cK", | 176 CHECK_PARSE_EQ("\\cj\\cJ\\ci\\cI\\ck\\cK", |
180 "'\\x0a\\x0a\\x09\\x09\\x0b\\x0b'"); | 177 "'\\x0a\\x0a\\x09\\x09\\x0b\\x0b'"); |
181 CHECK_PARSE_EQ("\\c!", "'c!'"); | 178 CHECK_PARSE_EQ("\\c!", "'c!'"); |
182 CHECK_PARSE_EQ("\\c_", "'c_'"); | 179 CHECK_PARSE_EQ("\\c_", "'c_'"); |
183 CHECK_PARSE_EQ("\\c~", "'c~'"); | 180 CHECK_PARSE_EQ("\\c~", "'c~'"); |
184 CHECK_PARSE_EQ("[a\\]c]", "[a ] c]"); | 181 CHECK_PARSE_EQ("[a\\]c]", "[a ] c]"); |
185 CHECK_PARSE_EQ("\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ", "'[]{}()%^# '"); | 182 CHECK_PARSE_EQ("\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ", "'[]{}()%^# '"); |
186 CHECK_PARSE_EQ("[\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ]", "[[ ] { } ( ) % ^ # ]"); | 183 CHECK_PARSE_EQ("[\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ]", "[[ ] { } ( ) % ^ # ]"); |
187 CHECK_PARSE_EQ("\\0", "'\\x00'"); | 184 CHECK_PARSE_EQ("\\0", "'\\x00'"); |
188 CHECK_PARSE_EQ("\\8", "'8'"); | 185 CHECK_PARSE_EQ("\\8", "'8'"); |
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1776 bool in_second = CharacterInSet(&l2, i); | 1773 bool in_second = CharacterInSet(&l2, i); |
1777 CHECK((in_first || in_second) == CharacterInSet(&all, i)); | 1774 CHECK((in_first || in_second) == CharacterInSet(&all, i)); |
1778 } | 1775 } |
1779 } | 1776 } |
1780 | 1777 |
1781 | 1778 |
1782 TEST(Graph) { | 1779 TEST(Graph) { |
1783 V8::Initialize(NULL); | 1780 V8::Initialize(NULL); |
1784 Execute("\\b\\w+\\b", false, true, true); | 1781 Execute("\\b\\w+\\b", false, true, true); |
1785 } | 1782 } |
OLD | NEW |