summaryrefslogtreecommitdiff
path: root/compiler/optimizing/constant_propagation_test.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2014-10-07 19:33:07 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-10-07 19:33:07 +0000
commita9f2904263581f606a5704f2bb74efcecf7e9f97 (patch)
tree8b1bec67452b84809cecd5645543e1f885ccbd44 /compiler/optimizing/constant_propagation_test.cc
parent4a1b4679cda2f0d2893b8e3f910c21231849291c (diff)
parent7fb49da8ec62e8a10ed9419ade9f32c6b1174687 (diff)
Merge "Add support for floats and doubles."
Diffstat (limited to 'compiler/optimizing/constant_propagation_test.cc')
-rw-r--r--compiler/optimizing/constant_propagation_test.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/optimizing/constant_propagation_test.cc b/compiler/optimizing/constant_propagation_test.cc
index 5c8c709439..d08d14db05 100644
--- a/compiler/optimizing/constant_propagation_test.cc
+++ b/compiler/optimizing/constant_propagation_test.cc
@@ -27,10 +27,11 @@ namespace art {
static void TestCode(const uint16_t* data,
const std::string& expected_before,
const std::string& expected_after_cp,
- const std::string& expected_after_dce) {
+ const std::string& expected_after_dce,
+ Primitive::Type return_type = Primitive::kPrimInt) {
ArenaPool pool;
ArenaAllocator allocator(&pool);
- HGraph* graph = CreateCFG(&allocator, data);
+ HGraph* graph = CreateCFG(&allocator, data, return_type);
ASSERT_NE(graph, nullptr);
graph->BuildDominatorTree();
@@ -279,7 +280,7 @@ TEST(ConstantPropagation, LongConstantFoldingOnAddition) {
};
std::string expected_after_dce = Patch(expected_after_cp, expected_dce_diff);
- TestCode(data, expected_before, expected_after_cp, expected_after_dce);
+ TestCode(data, expected_before, expected_after_cp, expected_after_dce, Primitive::kPrimLong);
}
/**
@@ -330,7 +331,7 @@ TEST(ConstantPropagation, LongConstantFoldingOnSubtraction) {
};
std::string expected_after_dce = Patch(expected_after_cp, expected_dce_diff);
- TestCode(data, expected_before, expected_after_cp, expected_after_dce);
+ TestCode(data, expected_before, expected_after_cp, expected_after_dce, Primitive::kPrimLong);
}
/**