Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
376eb0ce
Commit
376eb0ce
authored
Mar 13, 2013
by
kano4
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cut off eval_test from main
parent
c9f3fd47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
test/driver.c
test/driver.c
+22
-14
No files found.
test/driver.c
View file @
376eb0ce
...
...
@@ -36,13 +36,31 @@ check_error(mrb_state *mrb)
return
mrb_fixnum_p
(
ko_test
)
&&
mrb_fixnum
(
ko_test
)
==
0
&&
mrb_fixnum_p
(
kill_test
)
&&
mrb_fixnum
(
kill_test
)
==
0
;
}
static
int
eval_test
(
mrb_state
*
mrb
)
{
mrb_value
return_value
;
const
char
*
prog
=
"report()"
;
/* evaluate the test */
return_value
=
mrb_load_string
(
mrb
,
prog
);
/* did an exception occur? */
if
(
mrb
->
exc
)
{
mrb_p
(
mrb
,
return_value
);
mrb
->
exc
=
0
;
return
EXIT_FAILURE
;
}
else
if
(
!
check_error
(
mrb
))
{
return
EXIT_FAILURE
;
}
return
EXIT_SUCCESS
;
}
int
main
(
int
argc
,
char
**
argv
)
{
mrb_state
*
mrb
;
mrb_value
return_value
;
const
char
*
prog
=
"report()"
;
int
ret
=
EXIT_SUCCESS
;
int
ret
;
print_hint
();
...
...
@@ -59,17 +77,7 @@ main(int argc, char **argv)
}
mrb_init_mrbtest
(
mrb
);
/* evaluate the test */
return_value
=
mrb_load_string
(
mrb
,
prog
);
/* did an exception occur? */
if
(
mrb
->
exc
)
{
mrb_p
(
mrb
,
return_value
);
mrb
->
exc
=
0
;
ret
=
EXIT_FAILURE
;
}
else
if
(
!
check_error
(
mrb
))
{
ret
=
EXIT_FAILURE
;
}
ret
=
eval_test
(
mrb
);
mrb_close
(
mrb
);
return
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment