diff options
| author | Masaki Muranaka <[email protected]> | 2013-04-02 11:37:58 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2013-04-02 11:43:30 +0900 |
| commit | e129a4c8ef5b9bffc696202a73575c8ead187175 (patch) | |
| tree | 62334a1a44281219d40f478ef929de9bdade2709 /test/t/module.rb | |
| parent | 6bd49a3d95c836e82382f333a600a368bf0638fc (diff) | |
| download | mruby-e129a4c8ef5b9bffc696202a73575c8ead187175.tar.gz mruby-e129a4c8ef5b9bffc696202a73575c8ead187175.zip | |
Add test cases.
Diffstat (limited to 'test/t/module.rb')
| -rw-r--r-- | test/t/module.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb index 6c1c1acda..1ff9d3aea 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -129,6 +129,21 @@ assert('Module#const_get', '15.2.2.4.23') do Test4ConstSet.const_get(:Const4Test4ConstSet) == 23 end +assert('Module.constants', '15.2.2.4.24') do + $n = [] + module TestA + Const = 1 + end + class TestB + include TestA + Const2 = 1 + $n = constants.sort + end + + TestA.constants == [ :Const ] and + $n == [ :Const, :Const2 ] +end + assert('Module#include', '15.2.2.4.27') do module Test4Include Const4Include = 42 |
