1 // object_unittest.cc -- test Object, Relobj, etc.
10 namespace gold_testsuite
15 // Test basic Object functionality.
18 Object_test(Test_report
*)
20 Input_file
input_file("test.o", test_file_1
, test_file_1_size
);
21 Object
* object
= make_elf_object("test.o", &input_file
, 0,
22 test_file_1
, test_file_1_size
);
23 CHECK(object
->name() == "test.o");
24 CHECK(!object
->is_dynamic());
25 CHECK(object
->target() == target_test_pointer
);
26 CHECK(object
->is_locked());
28 CHECK(!object
->is_locked());
30 CHECK(object
->shnum() == 5);
31 CHECK(object
->section_name(0).empty());
32 CHECK(object
->section_name(1) == ".test");
33 CHECK(object
->section_flags(0) == 0);
34 CHECK(object
->section_flags(1) == elfcpp::SHF_ALLOC
);
39 Register_test
object_register("Object", Object_test
);
41 } // End namespace gold_testsuite.