Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
elfio mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Third Party Mirrors
elfio mirror
Commits
a638f47e
Commit
a638f47e
authored
8 years ago
by
Martin Bickel
Committed by
Serge Lamikhov-Center
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
new testcase for read/save sequence
parent
e838986d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
ELFIOTest/ELFIOTest1.cpp
+19
-3
19 additions, 3 deletions
ELFIOTest/ELFIOTest1.cpp
elf_examples/ppc-32bit-specimen3.elf
+0
-0
0 additions, 0 deletions
elf_examples/ppc-32bit-specimen3.elf
with
20 additions
and
3 deletions
.gitignore
+
1
−
0
View file @
a638f47e
...
...
@@ -29,6 +29,7 @@ elf_examples/write_exe_i386_32
elf_examples/write_exe_i386_32_w_addr
elf_examples/write_exe_i386_32_wo_addr
elf_examples/write_exe_i386_32_section_added
elf_examples/ppc-32bit-testcopy*.elf
/ELFIO.v12.suo
ELFIOTest/ELFIOTest
...
...
This diff is collapsed.
Click to expand it.
ELFIOTest/ELFIOTest1.cpp
+
19
−
3
View file @
a638f47e
...
...
@@ -219,6 +219,7 @@ BOOST_AUTO_TEST_CASE( write_exe_i386_32 )
BOOST_CHECK_MESSAGE
(
output
.
match_pattern
(),
"Comparing "
+
generated_file
+
" and "
+
reference_file
);
}
enum
Tests
{
SEG_ALIGN
=
1
};
void
checkObjestsAreEqual
(
std
::
string
file_name1
,
std
::
string
file_name2
)
{
...
...
@@ -278,7 +279,7 @@ void checkObjestsAreEqual( std::string file_name1, std::string file_name2 )
}
void
checkExeAreEqual
(
std
::
string
file_name1
,
std
::
string
file_name2
)
void
checkExeAreEqual
(
std
::
string
file_name1
,
std
::
string
file_name2
,
int
skipTests
=
0
)
{
checkObjestsAreEqual
(
file_name1
,
file_name2
);
...
...
@@ -289,8 +290,9 @@ void checkExeAreEqual( std::string file_name1, std::string file_name2 )
BOOST_REQUIRE_EQUAL
(
file2
.
load
(
file_name2
),
true
);
for
(
int
i
=
0
;
i
<
file1
.
segments
.
size
();
++
i
)
{
BOOST_CHECK_EQUAL
(
file1
.
segments
[
i
]
->
get_align
(),
file2
.
segments
[
i
]
->
get_align
()
);
if
(
!
(
skipTests
&
SEG_ALIGN
)
)
BOOST_CHECK_EQUAL
(
file1
.
segments
[
i
]
->
get_align
(),
file2
.
segments
[
i
]
->
get_align
()
);
BOOST_CHECK_EQUAL
(
file1
.
segments
[
i
]
->
get_file_size
(),
file2
.
segments
[
i
]
->
get_file_size
()
);
BOOST_CHECK_EQUAL
(
file1
.
segments
[
i
]
->
get_memory_size
(),
...
...
@@ -420,3 +422,17 @@ BOOST_AUTO_TEST_CASE( elf_exe_copy_32 )
checkExeAreEqual
(
"../elf_examples/test_ppc"
,
"../elf_examples/test_ppc_copy"
);
}
////////////////////////////////////////////////////////////////////////////////
BOOST_AUTO_TEST_CASE
(
elf_exe_loadsave_ppc32big3
)
{
std
::
string
in
=
"../elf_examples/ppc-32bit-specimen3.elf"
;
std
::
string
out
=
"../elf_examples/ppc-32bit-testcopy3.elf"
;
elfio
elf
;
BOOST_REQUIRE_EQUAL
(
elf
.
load
(
in
),
true
);
BOOST_REQUIRE_EQUAL
(
elf
.
save
(
out
),
true
);
checkObjestsAreEqual
(
in
,
out
);
checkExeAreEqual
(
in
,
out
,
SEG_ALIGN
);
}
This diff is collapsed.
Click to expand it.
elf_examples/ppc-32bit-specimen3.elf
0 → 100644
+
0
−
0
View file @
a638f47e
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment