@@ -57,4 +57,44 @@ def assert_pattern
57
57
end
58
58
end
59
59
60
+ def pend_if ( condition , *args , &block )
61
+ if condition
62
+ pend ( *args , &block )
63
+ else
64
+ block . call if block
65
+ end
66
+ end
67
+
68
+ def pend_unless ( condition , *args , &block )
69
+ if condition
70
+ block . call if block
71
+ else
72
+ pend ( *args , &block )
73
+ end
74
+ end
75
+
76
+ def omit_unless_cruby ( msg = "test omitted for non-CRuby" , &block )
77
+ omit_unless ( RUBY_ENGINE == "ruby" , msg , &block )
78
+ end
79
+
80
+ def omit_if_truffleruby ( msg = "test omitted on TruffleRuby" , &block )
81
+ omit_if ( RUBY_ENGINE == "truffleruby" , msg , &block )
82
+ end
83
+
84
+ def omit_if_jruby ( msg = "test omitted on JRuby" , &block )
85
+ omit_if ( RUBY_ENGINE == "jruby" , msg , &block )
86
+ end
87
+
88
+ def pend_unless_cruby ( msg = "test is pending for non-CRuby" , &block )
89
+ pend_unless ( RUBY_ENGINE == "ruby" , msg , &block )
90
+ end
91
+
92
+ def pend_if_truffleruby ( msg = "test is pending on TruffleRuby" , &block )
93
+ pend_if ( RUBY_ENGINE == "truffleruby" , msg , &block )
94
+ end
95
+
96
+ def pend_if_jruby ( msg = "test is pending on JRuby" , &block )
97
+ pend_if ( RUBY_ENGINE == "jruby" , msg , &block )
98
+ end
99
+
60
100
end
0 commit comments