OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 CompareStringsOneWay(s1, s2, expected_diff_parameter); | 151 CompareStringsOneWay(s1, s2, expected_diff_parameter); |
152 CompareStringsOneWay(s2, s1, expected_diff_parameter); | 152 CompareStringsOneWay(s2, s1, expected_diff_parameter); |
153 } | 153 } |
154 | 154 |
155 } // Anonymous namespace. | 155 } // Anonymous namespace. |
156 | 156 |
157 | 157 |
158 // --- T h e A c t u a l T e s t s | 158 // --- T h e A c t u a l T e s t s |
159 | 159 |
160 TEST(LiveEditDiffer) { | 160 TEST(LiveEditDiffer) { |
| 161 v8::internal::V8::Initialize(NULL); |
161 CompareStrings("zz1zzz12zz123zzz", "zzzzzzzzzz", 6); | 162 CompareStrings("zz1zzz12zz123zzz", "zzzzzzzzzz", 6); |
162 CompareStrings("zz1zzz12zz123zzz", "zz0zzz0zz0zzz", 9); | 163 CompareStrings("zz1zzz12zz123zzz", "zz0zzz0zz0zzz", 9); |
163 CompareStrings("123456789", "987654321", 16); | 164 CompareStrings("123456789", "987654321", 16); |
164 CompareStrings("zzz", "yyy", 6); | 165 CompareStrings("zzz", "yyy", 6); |
165 CompareStrings("zzz", "zzz12", 2); | 166 CompareStrings("zzz", "zzz12", 2); |
166 CompareStrings("zzz", "21zzz", 2); | 167 CompareStrings("zzz", "21zzz", 2); |
167 CompareStrings("cat", "cut", 2); | 168 CompareStrings("cat", "cut", 2); |
168 CompareStrings("ct", "cut", 1); | 169 CompareStrings("ct", "cut", 1); |
169 CompareStrings("cat", "ct", 1); | 170 CompareStrings("cat", "ct", 1); |
170 CompareStrings("cat", "cat", 0); | 171 CompareStrings("cat", "cat", 0); |
171 CompareStrings("", "", 0); | 172 CompareStrings("", "", 0); |
172 CompareStrings("cat", "", 3); | 173 CompareStrings("cat", "", 3); |
173 CompareStrings("a cat", "a capybara", 7); | 174 CompareStrings("a cat", "a capybara", 7); |
174 CompareStrings("abbabababababaaabbabababababbabbbbbbbababa", | 175 CompareStrings("abbabababababaaabbabababababbabbbbbbbababa", |
175 "bbbbabababbbabababbbabababababbabbababa"); | 176 "bbbbabababbbabababbbabababababbabbababa"); |
176 } | 177 } |
177 | 178 |
178 #endif // ENABLE_DEBUGGER_SUPPORT | 179 #endif // ENABLE_DEBUGGER_SUPPORT |
OLD | NEW |