From e8571877c49e2941e4aa5af4a356df5f305dc162 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Tue, 9 Feb 2016 05:36:57 +0000 Subject: [PATCH] Further reduce test overhead git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260198 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ProfileData/InstrProfTest.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/unittests/ProfileData/InstrProfTest.cpp b/unittests/ProfileData/InstrProfTest.cpp index 13067f0e2af..1c5264287a7 100644 --- a/unittests/ProfileData/InstrProfTest.cpp +++ b/unittests/ProfileData/InstrProfTest.cpp @@ -811,7 +811,7 @@ TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_module_test) { TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_compression_test) { std::vector FuncNames1; std::vector FuncNames2; - for (int I = 0; I < 128; I++) { + for (int I = 0; I < 3; I++) { std::string str; raw_string_ostream OS(str); OS << "func_" << I; @@ -838,8 +838,8 @@ TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_compression_test) { collectPGOFuncNameStrings( FuncNames2, (DoCompression && zlib::isAvailable()), FuncNameStrings2); - for (int Padding = 0; Padding < 3; Padding++) { - // Join with paddings: + for (int Padding = 0; Padding < 2; Padding++) { + // Join with paddings : std::string FuncNameStrings = FuncNameStrings1; for (int P = 0; P < Padding; P++) { FuncNameStrings.push_back('\0'); @@ -856,11 +856,7 @@ TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_compression_test) { ASSERT_EQ(StringRef("func_0"), R); R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames1[1])); ASSERT_EQ(StringRef("fooooooooooooooo_0"), R); - R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames2[100])); - ASSERT_EQ(StringRef("BAR_50"), R); - R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames2[101])); - ASSERT_EQ(StringRef("BlahblahBlahblahBar_50"), R); - for (int I = 0; I < 128; I++) { + for (int I = 0; I < 3; I++) { std::string N[4]; N[0] = FuncNames1[2 * I]; N[1] = FuncNames1[2 * I + 1]; -- 2.11.0