aboutsummaryrefslogtreecommitdiffstats
path: root/test/mkmf
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-23 07:18:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-23 07:18:06 +0000
commit894f6ba7f1237965ae02719140c8710e56b83784 (patch)
treeffddc917c832f237fbb87a459d21b4d477c73d82 /test/mkmf
parent5d223fabb78ea5718eb3931f0d84a6d3df6fa014 (diff)
downloadruby-894f6ba7f1237965ae02719140c8710e56b83784.tar.gz
mkmf.rb: large unsigned
* lib/mkmf.rb (MakeMakefile#try_constant): fix for large unsigned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/mkmf')
-rw-r--r--test/mkmf/test_constant.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/mkmf/test_constant.rb b/test/mkmf/test_constant.rb
index 6628f7f0bc..fd1f940c44 100644
--- a/test/mkmf/test_constant.rb
+++ b/test/mkmf/test_constant.rb
@@ -29,5 +29,9 @@ class TestMkmf
decl = "#define CONFTEST_VALUE (unsigned #{type})(((unsigned #{type})1)<<(CHAR_BIT*sizeof(int)))"
assert_operator(mkmf {try_constant("CONFTEST_VALUE", [[decl]])}, :>, 0, MKMFLOG)
end
+
+ def test_large_unsigned
+ assert_operator(mkmf {try_constant("1U<<(CHAR_BIT*sizeof(int)-1)")}, :>, 0, MKMFLOG)
+ end
end
end