summaryrefslogtreecommitdiff
path: root/test/fiddle/test_cparser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/fiddle/test_cparser.rb')
-rw-r--r--test/fiddle/test_cparser.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/fiddle/test_cparser.rb b/test/fiddle/test_cparser.rb
index c053706e136..5d9ac3c8151 100644
--- a/test/fiddle/test_cparser.rb
+++ b/test/fiddle/test_cparser.rb
@@ -127,10 +127,13 @@ module Fiddle
'short', 'unsigned short',
'int', 'unsigned int',
'long', 'unsigned long',
+ defined?(TYPE_LONG_LONG) && \
+ [
'long long', 'unsigned long long',
+ ],
'float', 'double',
'const char*', 'void*',
- ]
+ ].flatten.compact
func, ret, args = parse_signature("void func(#{types.join(',')})")
assert_equal 'func', func
assert_equal TYPE_VOID, ret
@@ -139,10 +142,13 @@ module Fiddle
TYPE_SHORT, -TYPE_SHORT,
TYPE_INT, -TYPE_INT,
TYPE_LONG, -TYPE_LONG,
+ defined?(TYPE_LONG_LONG) && \
+ [
TYPE_LONG_LONG, -TYPE_LONG_LONG,
+ ],
TYPE_FLOAT, TYPE_DOUBLE,
TYPE_VOIDP, TYPE_VOIDP,
- ], args
+ ].flatten.compact, args
end
def test_signature_single_variable