Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created August 21, 2017 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/714501a090cea8b2d402a01f5b8d9750 to your computer and use it in GitHub Desktop.
Save Whateverable/714501a090cea8b2d402a01f5b8d9750 to your computer and use it in GitHub Desktop.
committable6
1d69ebb9c2,HEAD https://raw.githubusercontent.com/perl6/roast/6.c-errata/S32-num/complex.t
¦«1d69ebb»:
Cannot find this revision (did you mean “1247986”?)
¦«HEAD(d5aec61)»:
1..512
ok 1 - postfix:<i> creates a Complex number
ok 2 - i creates a Complex number
ok 3 - i == 1i
ok 4 - != and complex numbers
ok 5 - ($n)i form creates a Complex number
ok 6 - $n\i form creates a Complex number
ok 7 - postfix:<i> works on an imaginary number
ok 8 - postfix:<i> works on a Complex number
1..2
ok 1 - '(2 + 3i) > (2 + 2i)' died
ok 2 - right exception type (Exception)
ok 9 - > comparison of complex numbers dies
1..2
ok 1 - '(1 + 2i) < (2 + 4i)' died
ok 2 - right exception type (Exception)
ok 10 - Cannot arithmetically compare Complex numbers
ok 11 - standalone i works to generate a Complex number
ok 12 - standalone i works to generate a Complex number
ok 13 - standalone i works times a Complex number
ok 14 - Complex division
ok 15 - Complex multiplication
ok 16 - dividing Complex by a Real
ok 17 - dividing a Real by a Complex
ok 18 - Real * Complex
ok 19 - Complex * Real
ok 20 - EVAL (1+3i).perl is Complex
ok 21 - EVAL (1+3i).perl is 1+3i
ok 22 - EVAL (1+0i).perl is Complex
ok 23 - EVAL (1+0i).perl is 1
ok 24 - EVAL (3i).perl is Complex
ok 25 - EVAL (3i).perl is 3i
ok 26 - (1+0i).Real is a Real
ok 27 - (1+0i).Real is 1
ok 28 - (1.2+0i).Int is an Int
ok 29 - (1.2+0i).Int is 1
ok 30 - (1.2.sin+0i).Rat is an Rat
ok 31 - (1.2.sin+0i).Rat is 1.2.sin
ok 32 - (1.2+0i).Num is an Num
ok 33 - (1.2+0i).Num is 1.2
ok 34 - (1.2+1i).Complex is an Complex
ok 35 - (1.2+1i).Complex is 1.2+1i
ok 36 - 0+0i + 0 = 0+0i
ok 37 - 0 + 0+0i = 0+0i
ok 38 - 0+0i + 0.0.Num = 0+0i
ok 39 - 0.0.Num + 0+0i = 0+0i
ok 40 - 0+0i + 0/1 = 0+0i
ok 41 - 0/1 + 0+0i = 0+0i
ok 42 - 0+0i - 0 = 0+0i
ok 43 - 0 - 0+0i = -0+0i
ok 44 - 0+0i - 0.0.Num = 0+0i
ok 45 - 0.0.Num - 0+0i = -0+0i
ok 46 - 0+0i - 0/1 = 0+0i
ok 47 - 0/1 - 0+0i = -0+0i
ok 48 - 0+0i + 2
ok 49 - 2 + 0+0i
ok 50 - 0+0i + 2.5.Num = 0+0i
ok 51 - 2.5.Num + 0+0i = 0+0i
ok 52 - 0+0i + 3/2
ok 53 - 3/2 + 0+0i
ok 54 - 0+0i - 2
ok 55 - 2 - 0+0i
ok 56 - 0+0i - 2.5.Num = 0+0i
ok 57 - 2.5.Num - 0+0i = 0+0i
ok 58 - 0+0i - 3/2
ok 59 - 3/2 - 0+0i
ok 60 - 1+0i + 0 = 1+0i
ok 61 - 0 + 1+0i = 1+0i
ok 62 - 1+0i + 0.0.Num = 1+0i
ok 63 - 0.0.Num + 1+0i = 1+0i
ok 64 - 1+0i + 0/1 = 1+0i
ok 65 - 0/1 + 1+0i = 1+0i
ok 66 - 1+0i - 0 = 1+0i
ok 67 - 0 - 1+0i = -1+0i
ok 68 - 1+0i - 0.0.Num = 1+0i
ok 69 - 0.0.Num - 1+0i = -1+0i
ok 70 - 1+0i - 0/1 = 1+0i
ok 71 - 0/1 - 1+0i = -1+0i
ok 72 - 1+0i + 2
ok 73 - 2 + 1+0i
ok 74 - 1+0i + 2.5.Num = 1+0i
ok 75 - 2.5.Num + 1+0i = 1+0i
ok 76 - 1+0i + 3/2
ok 77 - 3/2 + 1+0i
ok 78 - 1+0i - 2
ok 79 - 2 - 1+0i
ok 80 - 1+0i - 2.5.Num = 1+0i
ok 81 - 2.5.Num - 1+0i = 1+0i
ok 82 - 1+0i - 3/2
ok 83 - 3/2 - 1+0i
ok 84 - -1+0i + 0 = -1+0i
ok 85 - 0 + -1+0i = -1+0i
ok 86 - -1+0i + 0.0.Num = -1+0i
ok 87 - 0.0.Num + -1+0i = -1+0i
ok 88 - -1+0i + 0/1 = -1+0i
ok 89 - 0/1 + -1+0i = -1+0i
ok 90 - -1+0i - 0 = -1+0i
ok 91 - 0 - -1+0i = --1+0i
ok 92 - -1+0i - 0.0.Num = -1+0i
ok 93 - 0.0.Num - -1+0i = --1+0i
ok 94 - -1+0i - 0/1 = -1+0i
ok 95 - 0/1 - -1+0i = --1+0i
ok 96 - -1+0i + 2
ok 97 - 2 + -1+0i
ok 98 - -1+0i + 2.5.Num = -1+0i
ok 99 - 2.5.Num + -1+0i = -1+0i
ok 100 - -1+0i + 3/2
ok 101 - 3/2 + -1+0i
ok 102 - -1+0i - 2
ok 103 - 2 - -1+0i
ok 104 - -1+0i - 2.5.Num = -1+0i
ok 105 - 2.5.Num - -1+0i = -1+0i
ok 106 - -1+0i - 3/2
ok 107 - 3/2 - -1+0i
ok 108 - 0+1i + 0 = 0+1i
ok 109 - 0 + 0+1i = 0+1i
ok 110 - 0+1i + 0.0.Num = 0+1i
ok 111 - 0.0.Num + 0+1i = 0+1i
ok 112 - 0+1i + 0/1 = 0+1i
ok 113 - 0/1 + 0+1i = 0+1i
ok 114 - 0+1i - 0 = 0+1i
ok 115 - 0 - 0+1i = -0+1i
ok 116 - 0+1i - 0.0.Num = 0+1i
ok 117 - 0.0.Num - 0+1i = -0+1i
ok 118 - 0+1i - 0/1 = 0+1i
ok 119 - 0/1 - 0+1i = -0+1i
ok 120 - 0+1i + 2
ok 121 - 2 + 0+1i
ok 122 - 0+1i + 2.5.Num = 0+1i
ok 123 - 2.5.Num + 0+1i = 0+1i
ok 124 - 0+1i + 3/2
ok 125 - 3/2 + 0+1i
ok 126 - 0+1i - 2
ok 127 - 2 - 0+1i
ok 128 - 0+1i - 2.5.Num = 0+1i
ok 129 - 2.5.Num - 0+1i = 0+1i
ok 130 - 0+1i - 3/2
ok 131 - 3/2 - 0+1i
ok 132 - -0-1i + 0 = -0-1i
ok 133 - 0 + -0-1i = -0-1i
ok 134 - -0-1i + 0.0.Num = -0-1i
ok 135 - 0.0.Num + -0-1i = -0-1i
ok 136 - -0-1i + 0/1 = -0-1i
ok 137 - 0/1 + -0-1i = -0-1i
ok 138 - -0-1i - 0 = -0-1i
ok 139 - 0 - -0-1i = --0-1i
ok 140 - -0-1i - 0.0.Num = -0-1i
ok 141 - 0.0.Num - -0-1i = --0-1i
ok 142 - -0-1i - 0/1 = -0-1i
ok 143 - 0/1 - -0-1i = --0-1i
ok 144 - -0-1i + 2
ok 145 - 2 + -0-1i
ok 146 - -0-1i + 2.5.Num = -0-1i
ok 147 - 2.5.Num + -0-1i = -0-1i
ok 148 - -0-1i + 3/2
ok 149 - 3/2 + -0-1i
ok 150 - -0-1i - 2
ok 151 - 2 - -0-1i
ok 152 - -0-1i - 2.5.Num = -0-1i
ok 153 - 2.5.Num - -0-1i = -0-1i
ok 154 - -0-1i - 3/2
ok 155 - 3/2 - -0-1i
ok 156 - 2+0i + 0 = 2+0i
ok 157 - 0 + 2+0i = 2+0i
ok 158 - 2+0i + 0.0.Num = 2+0i
ok 159 - 0.0.Num + 2+0i = 2+0i
ok 160 - 2+0i + 0/1 = 2+0i
ok 161 - 0/1 + 2+0i = 2+0i
ok 162 - 2+0i - 0 = 2+0i
ok 163 - 0 - 2+0i = -2+0i
ok 164 - 2+0i - 0.0.Num = 2+0i
ok 165 - 0.0.Num - 2+0i = -2+0i
ok 166 - 2+0i - 0/1 = 2+0i
ok 167 - 0/1 - 2+0i = -2+0i
ok 168 - 2+0i + 2
ok 169 - 2 + 2+0i
ok 170 - 2+0i + 2.5.Num = 2+0i
ok 171 - 2.5.Num + 2+0i = 2+0i
ok 172 - 2+0i + 3/2
ok 173 - 3/2 + 2+0i
ok 174 - 2+0i - 2
ok 175 - 2 - 2+0i
ok 176 - 2+0i - 2.5.Num = 2+0i
ok 177 - 2.5.Num - 2+0i = 2+0i
ok 178 - 2+0i - 3/2
ok 179 - 3/2 - 2+0i
ok 180 - -2+0i + 0 = -2+0i
ok 181 - 0 + -2+0i = -2+0i
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Cannot convert 2+4i to Real: imaginary part not zero
in block <unit> at EVAL_1 line 1
in block at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 614
in sub subtest at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 403
in sub throws-like at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 641
in block <unit> at /tmp/dBS32foMX_ line 22
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Cannot convert 2+4i to Real: imaginary part not zero
in any at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/nqp/lib/Perl6/Optimizer.moarvm line 1
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Cannot convert 2+2i to Real: imaginary part not zero
in block <unit> at EVAL_0 line 1
in block at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 614
in sub subtest at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 403
in sub throws-like at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 641
in block <unit> at /tmp/dBS32foMX_ line 21
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Cannot convert 2+2i to Real: imaginary part not zero
in any at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/nqp/lib/Perl6/Optimizer.moarvm line 1
ok 182 - -2+0i + 0.0.Num = -2+0i
Unable to call postcircumfix $bt[ (Any) ] with a type object
Indexing requires a defined object
in sub is_approx at /tmp/whateverable/rakudo-moar/d5aec61f549b147dfd689ca844e9ca7a53b5c312/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 266
in block <unit> at /tmp/dBS32foMX_ line 73
# Looks like you planned 512 tests, but ran 182
Saw 1 occurrence of deprecated code.
================================================================================
Sub is_approx (from Test) seen at:
/tmp/dBS32foMX_, lines 17,18,24,25,26,34,35,36,37,38,39,42,44,46,55,57,59,70,71,72,73,74,75,77,78,79,80,81,82,84,85,86,87,88,89,91,92,93,94,95,96
Please use is-approx instead.
--------------------------------------------------------------------------------
Please contact the author to have these occurrences of deprecated code
adapted, so that this message will disappear! «exit code = 255»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment