Index: tests/WArrayTest.cpp |
diff --git a/tests/WArrayTest.cpp b/tests/WArrayTest.cpp |
index bb196eff2ef62eb7317dc4aa16c5e98131d01693..80f981816506df63fc25d3e756040ef2e630d412 100644 |
--- a/tests/WArrayTest.cpp |
+++ b/tests/WArrayTest.cpp |
@@ -12,95 +12,91 @@ |
using namespace skia_advanced_typeface_metrics_utils; |
-namespace { |
- |
// Negative values and zeros in a range plus trailing zeros. |
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
-const int16_t data1[] = {-1, 0, -3, 4, 5, 6, 7, 0, 0, 0, 8, 0, 0, 0, 0}; |
-const char* expected1 = "0[-1 0 -3 4 5 6 7 0 0 0 8]"; |
+static const int16_t data1[] = {-1, 0, -3, 4, 5, 6, 7, 0, 0, 0, 8, 0, 0, 0, 0}; |
+static const char* expected1 = "0[-1 0 -3 4 5 6 7 0 0 0 8]"; |
// Run with leading and trailing zeros. |
// Test rules: d 0 1 2 3 4 5 6 7 8 9 10 11 |
-const int16_t data2[] = {0, 0, 0, 100, 100, 100, 100, 100, 100, 100, 0, 0}; |
-const char* expected2 = "3 9 100"; |
+static const int16_t data2[] = {0, 0, 0, 100, 100, 100, 100, 100, 100, 100, 0, 0}; |
+static const char* expected2 = "3 9 100"; |
// Removing 0's from a range. |
// Test rules: a 0 1 2 3 4 5 6 7 8 9 10 11 |
-const int16_t data3[] = {1, 2, 0, 0, 0, 3, 4, 0, 0, 0, 0, 5}; |
-const char* expected3 = "0[1 2 0 0 0 3 4] 11[5]"; |
+static const int16_t data3[] = {1, 2, 0, 0, 0, 3, 4, 0, 0, 0, 0, 5}; |
+static const char* expected3 = "0[1 2 0 0 0 3 4] 11[5]"; |
// Removing 0's from a run/range and between runs. |
// Test rules: a, b 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 |
-const int16_t data4[] = {1, 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0, 0, 3, 4}; |
-const char* expected4 = "0[1 0 0 0 1] 5 7 2 8[3] 13[3 4]"; |
+static const int16_t data4[] = {1, 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0, 0, 3, 4}; |
+static const char* expected4 = "0[1 0 0 0 1] 5 7 2 8[3] 13[3 4]"; |
// Runs that starts outside a range. |
// Test rules: a, e 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
-const int16_t data5[] = {1, 1, 2, 3, 0, 0, 0, 0, 5, 5, 6, 7, 0, 0, 0, 0, 8, 0}; |
-const char* expected5 = "0 1 1 2[2 3] 8 9 5 10[6 7] 16[8]"; |
+static const int16_t data5[] = {1, 1, 2, 3, 0, 0, 0, 0, 5, 5, 6, 7, 0, 0, 0, 0, 8, 0}; |
+static const char* expected5 = "0 1 1 2[2 3] 8 9 5 10[6 7] 16[8]"; |
// Zeros and runs that should be broken out. |
// Test rules: a, b, e 0 1 2 3 4 5 6 7 8 9 10 11 12 13 |
-const int16_t data6[] = {1, 0, 0, 0, 0, 1, 2, 3, 3, 4, 5, 5, 5, 6}; |
-const char* expected6 = "0[1] 5[1 2 3 3 4] 10 12 5 13[6]"; |
+static const int16_t data6[] = {1, 0, 0, 0, 0, 1, 2, 3, 3, 4, 5, 5, 5, 6}; |
+static const char* expected6 = "0[1] 5[1 2 3 3 4] 10 12 5 13[6]"; |
// Don't cares that aren't enough to break out a run. |
// Test rules: c 0 1 2 3 4 5 |
-const int16_t data7[] = {1, 2, 10, 11, 2, 3}; |
-const char* expected7 = "0[1 2 10 11 2 3]"; |
-const uint32_t subset7[] = {0, 1, 4, 5}; |
-const char* expectedSubset7 = "0[1 2 0 0 2 3]"; |
+static const int16_t data7[] = {1, 2, 10, 11, 2, 3}; |
+static const char* expected7 = "0[1 2 10 11 2 3]"; |
+static const uint32_t subset7[] = {0, 1, 4, 5}; |
+static const char* expectedSubset7 = "0[1 2 0 0 2 3]"; |
// Don't cares that are enough to break out a run. |
// Test rules: c 0 1 2 3 4 5 6 |
-const int16_t data8[] = {1, 2, 10, 11, 12, 2, 3}; |
-const char* expected8 = "0[1 2 10 11 12 2 3]"; |
-const uint32_t subset8[] = {0, 1, 5, 6}; |
-const char* expectedSubset8 = "0[1] 1 5 2 6[3]"; |
+static const int16_t data8[] = {1, 2, 10, 11, 12, 2, 3}; |
+static const char* expected8 = "0[1 2 10 11 12 2 3]"; |
+static const uint32_t subset8[] = {0, 1, 5, 6}; |
+static const char* expectedSubset8 = "0[1] 1 5 2 6[3]"; |
// Leading don't cares. |
// Test rules: d 0 1 2 3 4 |
-const int16_t data9[] = {1, 1, 10, 2, 3}; |
-const char* expected9 = "0 1 1 2[10 2 3]"; |
-const uint32_t subset9[] = {0, 1, 3, 4}; |
-const char* expectedSubset9 = "0 1 1 3[2 3]"; |
+static const int16_t data9[] = {1, 1, 10, 2, 3}; |
+static const char* expected9 = "0 1 1 2[10 2 3]"; |
+static const uint32_t subset9[] = {0, 1, 3, 4}; |
+static const char* expectedSubset9 = "0 1 1 3[2 3]"; |
// Almost run of don't cares inside a range. |
// Test rules: c 0 1 2 3 4 5 |
-const int16_t data10[] = {1, 2, 10, 11, 12, 3}; |
-const char* expected10 = "0[1 2 10 11 12 3]"; |
-const uint32_t subset10[] = {0, 1, 5}; |
-const char* expectedSubset10 = "0[1 2 0 0 0 3]"; |
+static const int16_t data10[] = {1, 2, 10, 11, 12, 3}; |
+static const char* expected10 = "0[1 2 10 11 12 3]"; |
+static const uint32_t subset10[] = {0, 1, 5}; |
+static const char* expectedSubset10 = "0[1 2 0 0 0 3]"; |
// Run of don't cares inside a range. |
// Test rules: c 0 1 2 3 4 5 6 |
-const int16_t data11[] = {1, 2, 10, 11, 12, 13, 3}; |
-const char* expected11 = "0[1 2 10 11 12 13 3]"; |
-const uint32_t subset11[] = {0, 1, 6}; |
-const char* expectedSubset11 = "0[1 2] 6[3]"; |
+static const int16_t data11[] = {1, 2, 10, 11, 12, 13, 3}; |
+static const char* expected11 = "0[1 2 10 11 12 13 3]"; |
+static const uint32_t subset11[] = {0, 1, 6}; |
+static const char* expectedSubset11 = "0[1 2] 6[3]"; |
// Almost run within a range with leading don't cares. |
// Test rules: c 0 1 2 3 4 5 6 |
-const int16_t data12[] = {1, 10, 11, 2, 12, 13, 3}; |
-const char* expected12 = "0[1 10 11 2 12 13 3]"; |
-const uint32_t subset12[] = {0, 3, 6}; |
-const char* expectedSubset12 = "0[1 0 0 2 0 0 3]"; |
+static const int16_t data12[] = {1, 10, 11, 2, 12, 13, 3}; |
+static const char* expected12 = "0[1 10 11 2 12 13 3]"; |
+static const uint32_t subset12[] = {0, 3, 6}; |
+static const char* expectedSubset12 = "0[1 0 0 2 0 0 3]"; |
// Run within a range with leading don't cares. |
// Test rules: c 0 1 2 3 4 5 6 7 |
-const int16_t data13[] = {1, 10, 11, 2, 2, 12, 13, 3}; |
-const char* expected13 = "0[1 10 11 2 2 12 13 3]"; |
-const uint32_t subset13[] = {0, 3, 4, 7}; |
-const char* expectedSubset13 = "0[1] 1 6 2 7[3]"; |
+static const int16_t data13[] = {1, 10, 11, 2, 2, 12, 13, 3}; |
+static const char* expected13 = "0[1 10 11 2 2 12 13 3]"; |
+static const uint32_t subset13[] = {0, 3, 4, 7}; |
+static const char* expectedSubset13 = "0[1] 1 6 2 7[3]"; |
// Enough don't cares to breakup something. |
// Test rules: a 0 1 2 3 4 5 |
-const int16_t data14[] = {1, 0, 0, 0, 0, 2}; |
-const char* expected14 = "0[1] 5[2]"; |
-const uint32_t subset14[] = {0, 5}; |
-const char* expectedSubset14 = "0[1] 5[2]"; |
- |
-} |
+static const int16_t data14[] = {1, 0, 0, 0, 0, 2}; |
+static const char* expected14 = "0[1] 5[2]"; |
+static const uint32_t subset14[] = {0, 5}; |
+static const char* expectedSubset14 = "0[1] 5[2]"; |
static SkString stringify_advance_data(SkAdvancedTypefaceMetrics::AdvanceMetric<int16_t>* data) { |
SkString result; |