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
7a8a97cc
Commit
7a8a97cc
authored
May 05, 2014
by
cremno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Mrbtest::FIXNUM_{MAX,MIN,BIT}
parent
f0be02fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
test/driver.c
test/driver.c
+13
-0
No files found.
test/driver.c
View file @
7a8a97cc
...
...
@@ -87,6 +87,7 @@ main(int argc, char **argv)
{
mrb_state
*
mrb
;
struct
RClass
*
krn
;
struct
RClass
*
mrbtest
;
int
ret
;
print_hint
();
...
...
@@ -106,6 +107,18 @@ main(int argc, char **argv)
krn
=
mrb
->
kernel_module
;
mrb_define_method
(
mrb
,
krn
,
"__t_printstr__"
,
mrb_t_printstr
,
MRB_ARGS_REQ
(
1
));
mrbtest
=
mrb_define_module
(
mrb
,
"Mrbtest"
);
#ifdef MRB_WORD_BOXING
mrb_define_const
(
mrb
,
mrbtest
,
"FIXNUM_MAX"
,
mrb_fixnum_value
(
MRB_INT_MAX
>>
MRB_FIXNUM_SHIFT
));
mrb_define_const
(
mrb
,
mrbtest
,
"FIXNUM_MIN"
,
mrb_fixnum_value
(
MRB_INT_MIN
>>
MRB_FIXNUM_SHIFT
));
mrb_define_const
(
mrb
,
mrbtest
,
"FIXNUM_BIT"
,
mrb_fixnum_value
(
MRB_INT_BIT
>>
MRB_FIXNUM_SHIFT
));
#else
mrb_define_const
(
mrb
,
mrbtest
,
"FIXNUM_MAX"
,
mrb_fixnum_value
(
MRB_INT_MAX
));
mrb_define_const
(
mrb
,
mrbtest
,
"FIXNUM_MIN"
,
mrb_fixnum_value
(
MRB_INT_MIN
));
mrb_define_const
(
mrb
,
mrbtest
,
"FIXNUM_BIT"
,
mrb_fixnum_value
(
MRB_INT_BIT
));
#endif
mrb_init_mrbtest
(
mrb
);
ret
=
eval_test
(
mrb
);
mrb_close
(
mrb
);
...
...
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