Stubbed subs no longer have CvOUTSIDE set.
[p5sagit/Devel-Size.git] / t / code.t
index f2e1e26..eed0779 100644 (file)
--- a/t/code.t
+++ b/t/code.t
@@ -15,8 +15,13 @@ my $swoosh_size = total_size(\&swoosh);
 my $crunch_size = total_size(\&crunch);
 
 cmp_ok($whack_size, '>', 0, 'CV generated at runtime has a size');
-cmp_ok($zwapp_size, '>', $whack_size,
-       'CV stubbed at compiletime is larger (CvOUTSIDE is set and followed)');
+if("$]" >= 5.017) {
+    cmp_ok($zwapp_size, '==', $whack_size,
+          'CV stubbed at compiletime is the same size');
+} else {
+    cmp_ok($zwapp_size, '>', $whack_size,
+          'CV stubbed at compiletime is larger (CvOUTSIDE is set and followed)');
+}
 cmp_ok(length prototype \&swoosh, '>', 0, 'prototype has a length');
 cmp_ok($swoosh_size, '>', $zwapp_size + length prototype \&swoosh,
        'prototypes add to the size');