summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-test
AgeCommit message (Collapse)Author
2019-08-07Reorganize `mrb_string_value_cstr` and related functions.Yukihiro "Matz" Matsumoto
`mrb_string_value_cstr` and `mrb_string_value_len`: obsolete `mrb_string_cstr`: new function to retrieve NULL terminated C string `RSTRING_CSTR`: wrapper macro of `mrb_string_cstr`
2019-08-03Change second argument to `%l` of `mrb_vformat()` to `size_t` from `mrb_int`KOBAYASHI Shuji
- `size_t` is more commonly used. - `len` argument of `mrb_str_new()` is `size_t`. NOTE: The test for `%l` is temporarily disabled because adding a new type to `mrbgems/mruby-test/vformat.c` causes an error (memory error?) on Visual Studio 2017 in AppVeyor.
2019-08-03Fix `mrb_vformat("%f")` with `MRB_USE_FLOAT`KOBAYASHI Shuji
It potentially not work when `mrb_float` is `float` because `float` variable in variable length arguments is promoted to `double`. Also I fixed build with `MRB_WITHOUT_FLOAT`.
2019-08-02Change the `mrb_vformat` specifier `%d` for `int`KOBAYASHI Shuji
It potentially breaks, for example, in the case of `mrb_int` is 64-bit and more smaller type is passed by `%d`. In fact, the problem could become apparent when I used `%d` to `backtrace_location::lineno` in `src/backtrace.c:mrb_unpack_backtrace()` on AppVeyor. Therefore, change `%d` for `int` (not `mrb_int`) so that it can be used mostly without casting.
2019-08-01Add new specifiers/modifiers to format string of `mrb_vfromat()`KOBAYASHI Shuji
Format sequence syntax: %[modifier]specifier Modifiers: ----------+------------------------------------------------------------ Modifier | Meaning ----------+------------------------------------------------------------ ! | Convert to string by corresponding `inspect` instead of | corresponding `to_s`. ----------+------------------------------------------------------------ Specifiers: ----------+----------------+-------------------------------------------- Specifier | Argument Type | Note ----------+----------------+-------------------------------------------- c | char | d,i | mrb_int | f | mrb_float | l | char*, mrb_int | Arguments are string and length. n | mrb_sym | s | char* | Argument is NUL terminated string. t | mrb_value | Convert to type (class) of object. v,S | mrb_value | C | struct RClass* | T | mrb_value | Convert to real type (class) of object. Y | mrb_value | Same as `!v` if argument is `true`, `false` | | or `nil`, otherwise same as `T`. % | - | Convert to percent sign itself (no argument | | taken). ----------+----------------+-------------------------------------------- This change will increase the binary size, but replacing all format strings with new specifiers/modifiers will decrease the size because it reduces inline expansion of `mrb_obj_value()`, etc. at the caller.
2019-07-29Resolved conflicts in #4320Yukihiro "Matz" Matsumoto
2019-04-22Merge pull request #4356 from shuujii/add-assert_match-and-assert_not_matchYukihiro "Matz" Matsumoto
Add `assert_match` and `assert_not_match`
2019-04-14Add `assert_match` and `assert_not_match`KOBAYASHI Shuji
2019-04-10Fixed old style declaration; ref #4365Yukihiro "Matz" Matsumoto
2019-03-23Refactor `t_print` for testKOBAYASHI Shuji
2019-03-13Do not raise an exception when bintest failKOBAYASHI Shuji
- An exception do not raise when mrbtest fail. - There are no useful informations in exception message and backtrace.
2019-03-07Add a missing file for #4314KOBAYASHI Shuji
2019-02-22Integrate `init_mrbtest.c` to `driver.c` in `mruby-test` mrbgemKOBAYASHI Shuji
- `mrbgemtest_init()` is needed if `DISABLE_GEMS` is enabled because core tests are run as part of `mruby-test` mrbgem (moreover, `DISABLE_GEMS` is disabled when `enable_test` is used in build config). - For the same reason `mrb_open_core()` etc for core tests is unneeded.
2019-01-16Remove special treatments for `MRB_WITHOUT_FLOAT` in build scriptsKOBAYASHI Shuji
2018-10-29Merge pull request #4148 from take-cheeze/rename_libmruby_stuffYukihiro "Matz" Matsumoto
Rename `MRuby::Build#libmruby` stuff to avoid confusion
2018-10-29Rename libmruby stuff to avoid confusiontake-cheeze
2018-10-29Add missing dependency of source code generatortake-cheeze
2018-07-08Fix task name is not necessarily a valid pathSebastián Katzer
Errno::ENOENT: No such file or directory @ dir_s_mkdir - mruby:Z:/Documents
2018-06-20Make codacy happy.take-cheeze
2018-06-20Fix dependencies.take-cheeze
2018-06-20Comment out unused variable.take-cheeze
2018-06-20Fix forgotten argument passing.take-cheeze
2018-06-20Fix dependencies.take-cheeze
2018-06-13Fix unnecessary rebuild of tests.take-cheeze
2018-03-05Close `mrb_state` before exit.Takeshi Watanabe
2018-03-05Close on exception too.Takeshi Watanabe
2017-11-04Merge branch 'master' of github.com:mruby/mrubyYAMAMOTO Masaya
2017-10-28Flush stdout after every print from testsYukihiro "Matz" Matsumoto
2017-10-11Test for MRB_WITHOUT_FLOATYAMAMOTO Masaya
2017-09-27fix: mrbgems\mruby-test\driver.c(67): warning C4244: '=': conversion from ↵Tomasz Dąbrowski
'mrb_int' to 'int', possible loss of data
2016-11-24Fixed float tolerance in tests when MRB_USE_FLOAT is setTomasz Dąbrowski
2016-02-12Fix bug in mruby-test gem.Daniel Bovensiepen
In an used build path mruby-test wasn't updating mrbtest.c in the case that the mgem selection was changed. This lead to: - a missing reference in case a GEM was removed - ignoring all new GEMs added to the build configuration This fix keeps track of the active gems and demands a rebuild of mrbtest.c in case that the gem selection changed.
2015-11-27include changed from by quotes ("") to by brackets (<>); close #3032Yukihiro "Matz" Matsumoto
2015-11-24Remove unnecessary dependencies for assert_rb codegen and test_rbirepsZachary Scott
2015-11-24Remove mrbtest_irep from mrbtestZachary Scott
If we make the core tests a dependency on the mruby-test gem, we don't need to worry about maintaining the core test irep alone.
2015-10-24Ensure mrbs dependency is maintained for mruby-testZachary Scott
2015-09-03Add build_mrbtest after config block is evaluatedZachary Scott
This allows us to add `enable_test` anywhere in a build target, without having to worry about the order in which they are included. Previously, there was a bug that occured when adding 'mruby-test' gem to dependencies before additional gems. Instead of adding the 'mruby-test' gem dependency manually to a test build, we now only need to call `enable_test` in the target. This also allows us to call `test_enabled?` downstream when running mruby tests ourselves. /cc #2924
2015-08-22Refactor test/mrbtest.rake and tasks/mrbgems_test.rake into mrbgem.rakeZachary Scott
2015-08-22Move test source code and rake task to mrbgemZachary Scott