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

Side by Side Diff: courgette/third_party/qsufsort_unittest.cc

Issue 1855133002: convert //courgette to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment in memory_allocator.h Created 4 years, 8 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
« no previous file with comments | « courgette/third_party/bsdiff_create.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium 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 #include "courgette/third_party/qsufsort.h" 5 #include "courgette/third_party/qsufsort.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cstring> 10 #include <cstring>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
17 16
18 TEST(QSufSortTest, Sort) { 17 TEST(QSufSortTest, Sort) {
19 const char* test_cases[] = { 18 const char* test_cases[] = {
20 "", 19 "",
21 "a", 20 "a",
22 "za", 21 "za",
23 "CACAO", 22 "CACAO",
24 "banana", 23 "banana",
25 "tobeornottobe", 24 "tobeornottobe",
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 EXPECT_LE(pos, old_size - match_len) << "test_case[" << idx << "]"; 127 EXPECT_LE(pos, old_size - match_len) << "test_case[" << idx << "]";
129 EXPECT_EQ(0, ::memcmp(old_buf + pos, new_buf, match_len)) 128 EXPECT_EQ(0, ::memcmp(old_buf + pos, new_buf, match_len))
130 << "test_case[" << idx << "]"; 129 << "test_case[" << idx << "]";
131 } 130 }
132 if (test_case.exp_pos >= 0) { 131 if (test_case.exp_pos >= 0) {
133 EXPECT_EQ(test_case.exp_pos, pos) << "test_case[" << idx << "]"; 132 EXPECT_EQ(test_case.exp_pos, pos) << "test_case[" << idx << "]";
134 } 133 }
135 EXPECT_EQ(test_case.exp_match_len, match_len) << "test_case[" << idx << "]"; 134 EXPECT_EQ(test_case.exp_match_len, match_len) << "test_case[" << idx << "]";
136 } 135 }
137 } 136 }
OLDNEW
« no previous file with comments | « courgette/third_party/bsdiff_create.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698