# Ticket #313: tt313-win32-neg0.patch

File tt313-win32-neg0.patch, 2.3 KB (added by rurban, 5 years ago)
• ## t/op/arithmetics.t

old new
169169# Operations on a single NUMVAL
170170#
171171
172 SKIP: {
173     skip 'failing on your platform' => 1 if \$^O =~ m/openbsd/i;
172my \$output = <<OUTPUT;
173-0
1740
175-123.456789
176123.456789
177-0
1780
179-123.456789
180123.456789
181OUTPUT
182
183if (\$^O =~ m/openbsd|win32/i) {
184    \$output =~ s/-0\$/0/mg;
185}
174186
175 pasm_output_is( <<'CODE', <<OUTPUT, "turn a native number into its negative" );
187pasm_output_is( <<'CODE', \$output, "turn a native number into its negative" );
176188        set N0, 0
177189        neg N0
178190        print N0

208220        print "\n"
209221        end
210222CODE
211 -0
212 0
213 -123.456789
214 123.456789
215 -0
216 0
217 -123.456789
218 123.456789
219 OUTPUT
220
221 }
222223
223224pasm_output_is( <<'CODE', <<OUTPUT, "take the absolute of a native number" );
224225        set N0, 0
• ## t/pmc/float.t

old new
503503ok 2
504504OUTPUT
505505
506 SKIP: {
507     skip 'failing on your platform' => 1 if \$^O =~ m/openbsd/i;
506my \$output = '-0';
507if (\$^O =~ m/openbsd|win32/i) {
508    \$output =~ s/-0\$/0/mg;
509}
508510
509 pasm_output_like( << 'CODE', << 'OUTPUT', "neg 0" );
511pasm_output_is( << 'CODE', \$output, "neg 0" );
510512    new P0, ['Float']
511513    set P0, 0.0
512514    neg P0
513515        print P0
514516    end
515517CODE
516 /^-0/
517 OUTPUT
518
519 }
520518
521519pasm_output_is( << 'CODE', << 'OUTPUT', "Equality" );
522520    new P0, ['Float']
• ## t/pmc/complex.t

old new
10421042    .complex_op_is("-2-3i", "3.590565-0.530921i", 'sinh' )
10431043
10441044    eq osname, "openbsd", fail
1045    eq osname, "MSWin32", fail
10451046    .complex_op_is("0-2i", "-0.000000-0.909297i", 'sinh' )
10461047    .complex_op_is("0+2i", "-0.000000+0.909297i", 'sinh' )
10471048    .return()
10481049
10491050fail:
1050     skip( 2, 'failing on your platform' )
1051    skip( 2, 'sinh 0+2i, sinh 0-2i failing on your platform' )
10511052.end
10521053
10531054.sub cosh_of_complex_numbers