Add a test that verifies ARM executable which was generated by CLang and LLVM

Signed-off-by: Serge Lamikhov-Center <to_serge@users.sourceforge.net>
This commit is contained in:
Serge Lamikhov-Center 2014-02-27 19:25:24 +02:00
parent c95b3395cb
commit b227bf1482
3 changed files with 15 additions and 14 deletions

View File

@ -1027,6 +1027,7 @@ BOOST_AUTO_TEST_CASE( test_dynamic_64_3 )
da1.add_entry( tag, value );
}
}
for ( unsigned int i = 0; i < da.get_entries_num(); ++i ) {
da.get_entry( i, tag, value, str );
da1.get_entry( i, tag1, value1, str1 );

View File

@ -286,11 +286,10 @@ void checkExeAreEqual( std::string file_name1, std::string file_name2 )
elfio file1;
elfio file2;
BOOST_REQUIRE_EQUAL( file1.load( file_name1 ), true );
BOOST_CHECK_EQUAL( file1.save( file_name2 ), true );
BOOST_REQUIRE_EQUAL( file1.load( file_name1 ), true );
BOOST_REQUIRE_EQUAL( file2.load( file_name2 ), true );
/*
for (int i = 0; i < file1.segments.size(); ++i ) {
BOOST_REQUIRE_NE( file1.segments[i]->get_data(), (const char*)0 );
BOOST_REQUIRE_NE( file2.segments[i]->get_data(), (const char*)0 );
@ -305,10 +304,9 @@ void checkExeAreEqual( std::string file_name1, std::string file_name2 )
file2.segments[i]->get_file_size() );
BOOST_CHECK_EQUAL( file1.segments[i]->get_memory_size(),
file2.segments[i]->get_memory_size() );
// BOOST_CHECK_EQUAL_COLLECTIONS( pdata1.begin(), pdata1.end(),
// pdata2.begin(), pdata2.end() );
BOOST_CHECK_EQUAL_COLLECTIONS( pdata1.begin(), pdata1.end(),
pdata2.begin(), pdata2.end() );
}
*/
}
@ -373,14 +371,16 @@ BOOST_AUTO_TEST_CASE( elf_exe_copy_32 )
{
//checkExeAreEqual( "../elf_examples/ls",
//"../elf_examples/ls_copy" );
checkExeAreEqual( "../elf_examples/hello_32",
"../elf_examples/hello_32_copy" );
//checkExeAreEqual( "../elf_examples/asm",
//"../elf_examples/asm_copy" );
//checkExeAreEqual( "../elf_examples/asm64",
//"../elf_examples/asm64_copy" );
//checkExeAreEqual( "../elf_examples/hello_32",
//"../elf_examples/hello_32_copy" );
checkExeAreEqual( "../elf_examples/asm",
"../elf_examples/asm_copy" );
// checkExeAreEqual( "../elf_examples/asm64",
// "../elf_examples/asm64_copy" );
//checkExeAreEqual( "../elf_examples/hello_64",
//"../elf_examples/hello_64_copy" );
//checkExeAreEqual( "../elf_examples/test_ppc",
//"../elf_examples/test_ppc_copy" );
// checkExeAreEqual( "../elf_examples/test_ppc",
// "../elf_examples/test_ppc_copy" );
checkExeAreEqual("../elf_examples/read_write_arm_elf32_input",
"../elf_examples/read_write_arm_elf32_input_copy");
}

Binary file not shown.