aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/array/pack/l_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core/array/pack/l_spec.rb')
-rw-r--r--spec/rubyspec/core/array/pack/l_spec.rb216
1 files changed, 64 insertions, 152 deletions
diff --git a/spec/rubyspec/core/array/pack/l_spec.rb b/spec/rubyspec/core/array/pack/l_spec.rb
index 8066b23e90..5c1ad21d12 100644
--- a/spec/rubyspec/core/array/pack/l_spec.rb
+++ b/spec/rubyspec/core/array/pack/l_spec.rb
@@ -29,7 +29,7 @@ describe "Array#pack with format 'L'" do
it_behaves_like :array_pack_32bit_be, 'L>'
end
- platform_is wordsize: 32 do
+ guard -> { platform_is wordsize: 32 or platform_is :mingw32 } do
describe "with modifier '<' and '_'" do
it_behaves_like :array_pack_32bit_le, 'L<_'
it_behaves_like :array_pack_32bit_le, 'L_<'
@@ -51,49 +51,25 @@ describe "Array#pack with format 'L'" do
end
end
- platform_is wordsize: 64 do
- platform_is_not :mingw32 do
- describe "with modifier '<' and '_'" do
- it_behaves_like :array_pack_64bit_le, 'L<_'
- it_behaves_like :array_pack_64bit_le, 'L_<'
- end
-
- describe "with modifier '<' and '!'" do
- it_behaves_like :array_pack_64bit_le, 'L<!'
- it_behaves_like :array_pack_64bit_le, 'L!<'
- end
-
- describe "with modifier '>' and '_'" do
- it_behaves_like :array_pack_64bit_be, 'L>_'
- it_behaves_like :array_pack_64bit_be, 'L_>'
- end
-
- describe "with modifier '>' and '!'" do
- it_behaves_like :array_pack_64bit_be, 'L>!'
- it_behaves_like :array_pack_64bit_be, 'L!>'
- end
- end
-
- platform_is :mingw32 do
- describe "with modifier '<' and '_'" do
- it_behaves_like :array_pack_32bit_le, 'L<_'
- it_behaves_like :array_pack_32bit_le, 'L_<'
- end
-
- describe "with modifier '<' and '!'" do
- it_behaves_like :array_pack_32bit_le, 'L<!'
- it_behaves_like :array_pack_32bit_le, 'L!<'
- end
-
- describe "with modifier '>' and '_'" do
- it_behaves_like :array_pack_32bit_be, 'L>_'
- it_behaves_like :array_pack_32bit_be, 'L_>'
- end
-
- describe "with modifier '>' and '!'" do
- it_behaves_like :array_pack_32bit_be, 'L>!'
- it_behaves_like :array_pack_32bit_be, 'L!>'
- end
+ guard -> { platform_is wordsize: 64 and platform_is_not :mingw32 } do
+ describe "with modifier '<' and '_'" do
+ it_behaves_like :array_pack_64bit_le, 'L<_'
+ it_behaves_like :array_pack_64bit_le, 'L_<'
+ end
+
+ describe "with modifier '<' and '!'" do
+ it_behaves_like :array_pack_64bit_le, 'L<!'
+ it_behaves_like :array_pack_64bit_le, 'L!<'
+ end
+
+ describe "with modifier '>' and '_'" do
+ it_behaves_like :array_pack_64bit_be, 'L>_'
+ it_behaves_like :array_pack_64bit_be, 'L_>'
+ end
+
+ describe "with modifier '>' and '!'" do
+ it_behaves_like :array_pack_64bit_be, 'L>!'
+ it_behaves_like :array_pack_64bit_be, 'L!>'
end
end
end
@@ -107,7 +83,7 @@ describe "Array#pack with format 'l'" do
it_behaves_like :array_pack_32bit_be, 'l>'
end
- platform_is wordsize: 32 do
+ guard -> { platform_is wordsize: 32 or platform_is :mingw32 } do
describe "with modifier '<' and '_'" do
it_behaves_like :array_pack_32bit_le, 'l<_'
it_behaves_like :array_pack_32bit_le, 'l_<'
@@ -129,49 +105,25 @@ describe "Array#pack with format 'l'" do
end
end
- platform_is wordsize: 64 do
- platform_is_not :mingw32 do
- describe "with modifier '<' and '_'" do
- it_behaves_like :array_pack_64bit_le, 'l<_'
- it_behaves_like :array_pack_64bit_le, 'l_<'
- end
-
- describe "with modifier '<' and '!'" do
- it_behaves_like :array_pack_64bit_le, 'l<!'
- it_behaves_like :array_pack_64bit_le, 'l!<'
- end
-
- describe "with modifier '>' and '_'" do
- it_behaves_like :array_pack_64bit_be, 'l>_'
- it_behaves_like :array_pack_64bit_be, 'l_>'
- end
-
- describe "with modifier '>' and '!'" do
- it_behaves_like :array_pack_64bit_be, 'l>!'
- it_behaves_like :array_pack_64bit_be, 'l!>'
- end
- end
-
- platform_is :mingw32 do
- describe "with modifier '<' and '_'" do
- it_behaves_like :array_pack_32bit_le, 'l<_'
- it_behaves_like :array_pack_32bit_le, 'l_<'
- end
-
- describe "with modifier '<' and '!'" do
- it_behaves_like :array_pack_32bit_le, 'l<!'
- it_behaves_like :array_pack_32bit_le, 'l!<'
- end
-
- describe "with modifier '>' and '_'" do
- it_behaves_like :array_pack_32bit_be, 'l>_'
- it_behaves_like :array_pack_32bit_be, 'l_>'
- end
-
- describe "with modifier '>' and '!'" do
- it_behaves_like :array_pack_32bit_be, 'l>!'
- it_behaves_like :array_pack_32bit_be, 'l!>'
- end
+ guard -> { platform_is wordsize: 64 and platform_is_not :mingw32 } do
+ describe "with modifier '<' and '_'" do
+ it_behaves_like :array_pack_64bit_le, 'l<_'
+ it_behaves_like :array_pack_64bit_le, 'l_<'
+ end
+
+ describe "with modifier '<' and '!'" do
+ it_behaves_like :array_pack_64bit_le, 'l<!'
+ it_behaves_like :array_pack_64bit_le, 'l!<'
+ end
+
+ describe "with modifier '>' and '_'" do
+ it_behaves_like :array_pack_64bit_be, 'l>_'
+ it_behaves_like :array_pack_64bit_be, 'l_>'
+ end
+
+ describe "with modifier '>' and '!'" do
+ it_behaves_like :array_pack_64bit_be, 'l>!'
+ it_behaves_like :array_pack_64bit_be, 'l!>'
end
end
end
@@ -185,7 +137,7 @@ little_endian do
it_behaves_like :array_pack_32bit_le, 'l'
end
- platform_is wordsize: 32 do
+ guard -> { platform_is wordsize: 32 or platform_is :mingw32 } do
describe "Array#pack with format 'L' with modifier '_'" do
it_behaves_like :array_pack_32bit_le, 'L_'
end
@@ -203,41 +155,21 @@ little_endian do
end
end
- platform_is wordsize: 64 do
- platform_is_not :mingw32 do
- describe "Array#pack with format 'L' with modifier '_'" do
- it_behaves_like :array_pack_64bit_le, 'L_'
- end
-
- describe "Array#pack with format 'L' with modifier '!'" do
- it_behaves_like :array_pack_64bit_le, 'L!'
- end
-
- describe "Array#pack with format 'l' with modifier '_'" do
- it_behaves_like :array_pack_64bit_le, 'l_'
- end
-
- describe "Array#pack with format 'l' with modifier '!'" do
- it_behaves_like :array_pack_64bit_le, 'l!'
- end
+ guard -> { platform_is wordsize: 64 and platform_is_not :mingw32 } do
+ describe "Array#pack with format 'L' with modifier '_'" do
+ it_behaves_like :array_pack_64bit_le, 'L_'
end
- platform_is :mingw32 do
- describe "Array#pack with format 'L' with modifier '_'" do
- it_behaves_like :array_pack_32bit_le, 'L_'
- end
-
- describe "Array#pack with format 'L' with modifier '!'" do
- it_behaves_like :array_pack_32bit_le, 'L!'
- end
+ describe "Array#pack with format 'L' with modifier '!'" do
+ it_behaves_like :array_pack_64bit_le, 'L!'
+ end
- describe "Array#pack with format 'l' with modifier '_'" do
- it_behaves_like :array_pack_32bit_le, 'l_'
- end
+ describe "Array#pack with format 'l' with modifier '_'" do
+ it_behaves_like :array_pack_64bit_le, 'l_'
+ end
- describe "Array#pack with format 'l' with modifier '!'" do
- it_behaves_like :array_pack_32bit_le, 'l!'
- end
+ describe "Array#pack with format 'l' with modifier '!'" do
+ it_behaves_like :array_pack_64bit_le, 'l!'
end
end
end
@@ -251,7 +183,7 @@ big_endian do
it_behaves_like :array_pack_32bit_be, 'l'
end
- platform_is wordsize: 32 do
+ guard -> { platform_is wordsize: 32 or platform_is :mingw32 } do
describe "Array#pack with format 'L' with modifier '_'" do
it_behaves_like :array_pack_32bit_be, 'L_'
end
@@ -269,41 +201,21 @@ big_endian do
end
end
- platform_is wordsize: 64 do
- platform_is_not :mingw32 do
- describe "Array#pack with format 'L' with modifier '_'" do
- it_behaves_like :array_pack_64bit_be, 'L_'
- end
-
- describe "Array#pack with format 'L' with modifier '!'" do
- it_behaves_like :array_pack_64bit_be, 'L!'
- end
-
- describe "Array#pack with format 'l' with modifier '_'" do
- it_behaves_like :array_pack_64bit_be, 'l_'
- end
-
- describe "Array#pack with format 'l' with modifier '!'" do
- it_behaves_like :array_pack_64bit_be, 'l!'
- end
+ guard -> { platform_is wordsize: 64 and platform_is_not :mingw32 } do
+ describe "Array#pack with format 'L' with modifier '_'" do
+ it_behaves_like :array_pack_64bit_be, 'L_'
end
- platform_is :mingw32 do
- describe "Array#pack with format 'L' with modifier '_'" do
- it_behaves_like :array_pack_32bit_be, 'L_'
- end
-
- describe "Array#pack with format 'L' with modifier '!'" do
- it_behaves_like :array_pack_32bit_be, 'L!'
- end
+ describe "Array#pack with format 'L' with modifier '!'" do
+ it_behaves_like :array_pack_64bit_be, 'L!'
+ end
- describe "Array#pack with format 'l' with modifier '_'" do
- it_behaves_like :array_pack_32bit_be, 'l_'
- end
+ describe "Array#pack with format 'l' with modifier '_'" do
+ it_behaves_like :array_pack_64bit_be, 'l_'
+ end
- describe "Array#pack with format 'l' with modifier '!'" do
- it_behaves_like :array_pack_32bit_be, 'l!'
- end
+ describe "Array#pack with format 'l' with modifier '!'" do
+ it_behaves_like :array_pack_64bit_be, 'l!'
end
end
end