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
76588769
Commit
76588769
authored
8 years ago
by
fvrmatteo
Browse files
Options
Downloads
Patches
Plain Diff
Fixed the test case #73
parent
4cf4800d
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_mem_size.py
+9
-4
9 additions, 4 deletions
suite/regress/x86_mem_size.py
with
9 additions
and
4 deletions
suite/regress/x86_mem_size.py
+
9
−
4
View file @
76588769
...
...
@@ -12,10 +12,15 @@ 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
encoding
,
count
=
ks
.
asm
(
b
"
add ptr ss:[eax + ebx], 0x777
"
)
# Assert the result
self
.
assertEqual
(
encoding
,
[])
try
:
# Assemble to get back insn encoding & statement count
encoding
,
count
=
ks
.
asm
(
b
"
add ptr ss:[eax + ebx], 0x777
"
)
expect
KsError
as
e
:
if
e
.
errno
==
KS_ERR_ASM_INVALIDOPERAND
:
print
(
"
Got error KS_ERR_ASM_INVALIDOPERAND as expected
"
)
else
self
.
assertFalse
(
1
,
"
ERROR: %s
"
%
e
)
if
__name__
==
'
__main__
'
regress
.
main
()
\ No newline at end of file
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