lirasm: fix trivial Windows test failure

RESOLVED FIXED

Status

RESOLVED FIXED
8 years ago
5 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
We currently get this:

  TEST-UNEXPECTED-FAIL | lirasm | lirasm  --execute ../nanojit-src/lirasm/tests/hardfloat/ui2d.in
  expected output
  Output is: 4.29497e+09
  actual output
  Output is: 4.29497e+009

That's really annoying.  We currently use |cout << d| to print the double result.  Anyone know if printf("%f") or printf("%g") gives more consistent results across all platforms?

Comment 1

8 years ago
Looks like we won't be able to eliminate compiler/lib differences, but I wonder if post-processing is a feasible option.

Comment 2

8 years ago
Created attachment 487469 [details] [diff] [review]
sed to the rescue

Not pretty but should do the job to make windows happy.
Attachment #487469 - Flags: review?(nnethercote)
(Assignee)

Comment 3

8 years ago
Comment on attachment 487469 [details] [diff] [review]
sed to the rescue

r=me if you add a brief comment explaining why the sed command is there.  Thanks!
Attachment #487469 - Flags: review?(nnethercote) → review+

Comment 5

8 years ago
(In reply to comment #4)
> rreitmai http://hg.mozilla.org/projects/nanojit-central/rev/fa319402f3bb

Gak, change applied to input file, not output... fix coming.

Comment 6

8 years ago
Ignore comment 5, the problem was cygwin sed's treatment of escape.

fix in http://hg.mozilla.org/projects/nanojit-central/rev/cf0963c16a8c

Comment 8

8 years ago
http://hg.mozilla.org/mozilla-central/rev/a23a09d2a9b6
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Component: Nanojit → Nanojit
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.