File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,8 @@ sub _make {
204
204
($p , $q ) = ($1 , 0);
205
205
} elsif ($arg =~ / ^(?:$gre )?$gre \s *i\s *$ / ) {
206
206
($p , $q ) = ($1 || 0, $2 );
207
+ } elsif ($arg =~ / ^(?:$gre )?\s *([+\- ]?)i\s *$ / ) {
208
+ ($p , $q ) = ($1 || 0, $2 . ' 1' );
207
209
} elsif ($arg =~ / ^\s *\( $gre \s *(?:,$gre \s *)?\)\s *$ / ) {
208
210
($p , $q ) = ($1 , $2 || 0);
209
211
}
Original file line number Diff line number Diff line change 347
347
print "ok $test \n ";
348
348
EOS
349
349
350
+ $test ++;
351
+ push @script , <<EOS ;
352
+ print "# remake 2+i\n ";
353
+ \$ z = cplx('2+i');
354
+ print "not " unless \$ z == Math::Complex->make(2,1);
355
+ print "ok $test \n ";
356
+ EOS
357
+
358
+ $test ++;
359
+ push @script , <<EOS ;
360
+ print "# make 3-i\n ";
361
+ \$ z = Math::Complex->make('3-i');
362
+ print "not " unless \$ z == cplx(3,-1);
363
+ print "ok $test \n ";
364
+ EOS
365
+
350
366
$test ++;
351
367
push @script , <<EOS ;
352
368
print "# emake [2,3]\n ";
You can’t perform that action at this time.
0 commit comments