aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/binary_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/testsuite/binary_unittest.cc')
-rw-r--r--gold/testsuite/binary_unittest.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/gold/testsuite/binary_unittest.cc b/gold/testsuite/binary_unittest.cc
index 2645e0b..b2e14df 100644
--- a/gold/testsuite/binary_unittest.cc
+++ b/gold/testsuite/binary_unittest.cc
@@ -44,8 +44,9 @@ using namespace gold;
template<int size, bool big_endian>
bool
-Sized_binary_test(Target* target)
+Sized_binary_test()
{
+ parameters_clear_target();
// We need a pretend Task.
const Task* task = reinterpret_cast<const Task*>(-1);
@@ -73,7 +74,6 @@ Sized_binary_test(Target* target)
return false;
CHECK(!object->is_dynamic());
- CHECK(object->target() == target);
CHECK(object->shnum() == 5);
CHECK(object->section_name(1) == ".data");
CHECK(object->section_flags(1) == (elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE));
@@ -125,23 +125,27 @@ Binary_test(Test_report*)
int fail = 0;
#ifdef HAVE_TARGET_32_LITTLE
- if (!Sized_binary_test<32, false>(target_test_pointer_32_little))
+ if (!Sized_binary_test<32, false>())
++fail;
+ CHECK(&parameters->target() == target_test_pointer_32_little);
#endif
#ifdef HAVE_TARGET_32_BIG
- if (!Sized_binary_test<32, true>(target_test_pointer_32_big))
+ if (!Sized_binary_test<32, true>())
++fail;
+ CHECK(&parameters->target() == target_test_pointer_32_big);
#endif
#ifdef HAVE_TARGET_64_LITTLE
- if (!Sized_binary_test<64, false>(target_test_pointer_64_little))
+ if (!Sized_binary_test<64, false>())
++fail;
+ CHECK(&parameters->target() == target_test_pointer_64_little);
#endif
#ifdef HAVE_TARGET_64_BIG
- if (!Sized_binary_test<64, true>(target_test_pointer_64_big))
+ if (!Sized_binary_test<64, true>())
++fail;
+ CHECK(&parameters->target() == target_test_pointer_64_big);
#endif
return fail == 0;