Issue 27 in google-js-test: DataView Int8 type doesn't work.

6 views
Skip to first unread message

google-...@googlecode.com

unread,
Oct 10, 2012, 2:46:14 PM10/10/12
to google-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 27 by wbax...@google.com: DataView Int8 type doesn't work.
http://code.google.com/p/google-js-test/issues/detail?id=27

What steps will reproduce the problem?

var array = new Uint8Array([0xff]);
var view = new DataView(array.buffer);
expectEq(-1, view.getInt8(0));



What is the expected output? What do you see instead?

The test should pass, but it fails saying it got 255 when it expected -1.


google-...@googlecode.com

unread,
Oct 23, 2012, 1:10:36 AM10/23/12
to google-...@googlegroups.com

Comment #1 on issue 27 by jaco...@google.com: DataView Int8 type doesn't
work.
http://code.google.com/p/google-js-test/issues/detail?id=27

I've added extensive integration tests for DataView (see rev
02710b555d2e106e90f60dd7cf667affb36881b6) and cannot reproduce this. What
version are you using?

google-...@googlecode.com

unread,
Oct 23, 2012, 1:27:15 AM10/23/12
to google-...@googlegroups.com
Updates:
Status: Accepted
Owner: jaco...@google.com

Comment #2 on issue 27 by jaco...@google.com: DataView Int8 type doesn't
work.
http://code.google.com/p/google-js-test/issues/detail?id=27

Ah, I figured it out. The typed array code from node.js uses `char` for
representing signed 8-bit integers, but the C standard allows for `char` to
be
unsigned. My Mac uses signed ones, so I couldn't reproduce this. Will fix.

google-...@googlecode.com

unread,
Oct 23, 2012, 1:30:01 AM10/23/12
to google-...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 27 by jaco...@google.com: DataView Int8 type doesn't
work.
http://code.google.com/p/google-js-test/issues/detail?id=27

This issue was closed by revision ce4b7feddc85.

Reply all
Reply to author
Forward
0 new messages