Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Keystone
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
Keystone
Commits
b9942f9c
Commit
b9942f9c
authored
8 years ago
by
mrexodia
Browse files
Options
Downloads
Patches
Plain Diff
added test for issue #10 (push word 0xd)
parent
ce27af97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
suite/regress/x86_issue10.py
+24
-0
24 additions, 0 deletions
suite/regress/x86_issue10.py
with
24 additions
and
0 deletions
suite/regress/x86_issue10.py
0 → 100644
+
24
−
0
View file @
b9942f9c
#!/usr/bin/python
# Test 'push word 0xd'
# Github issue: #10
# Author: Duncan (mrexodia)
from
keystone
import
*
import
regress
class
TestX86
(
regress
.
RegressTest
):
def
runTest
(
self
):
# Initialize Keystone engine
ks
=
Ks
(
KS_ARCH_X86
,
KS_MODE_32
)
# Assemble to get back insn encoding & statement count
encoding1
,
_
=
ks
.
asm
(
b
"
push 0xd
"
)
encoding2
,
_
=
ks
.
asm
(
b
"
push word 0xd
"
)
# Assert the result
self
.
assertEqual
(
encoding1
,
[
0x6a
,
0x0d
])
self
.
assertEqual
(
encoding2
,
[
0x66
,
0x6a
,
0x0d
])
if
__name__
==
'
__main__
'
:
regress
.
main
()
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