diff options
author | 2012-08-28 14:40:49 +0000 | |
---|---|---|
committer | 2012-08-28 14:40:49 +0000 | |
commit | 5ee3f67ce35f19f6e5ef44b67db62e964f77d69d (patch) | |
tree | 998baf6ebcddd0ec3e5faef194175f5f971085ae /tests | |
parent | d0f3f6825bd5c232da52f4dc1af69b76403b797f (diff) |
Added an overload of SkTQSort that sorts an array of values, rather than an array of pointers.
Also added some parentheses to all the QSort variants to get rid of a gcc warning.
Review URL: https://codereview.appspot.com/6492044
git-svn-id: http://skia.googlecode.com/svn/trunk@5311 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SortTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/SortTest.cpp b/tests/SortTest.cpp index d1a61d4c70..65c48639a2 100644 --- a/tests/SortTest.cpp +++ b/tests/SortTest.cpp @@ -69,6 +69,10 @@ static void TestSort(skiatest::Reporter* reporter) { rand_array(rand, array, count); SkTHeapSort<int>(array, count); check_sort(reporter, "Heap", array, count); + + rand_array(rand, array, count); + SkTQSort<int>(array, array + count - 1); + check_sort(reporter, "Quick", array, count); } if (false) { // avoid bit rot, suppress warning compare_int(array, array); |