diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2017-01-12 18:02:45 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-06-14 08:19:47 +0000 |
commit | a021bd87755ccfbe49e132f942ded935c9719b00 (patch) | |
tree | 1fe242bfb77cd4723ed01d4fdd1815ab6338c706 /tests/manual/v4 | |
parent | 784ea8c09d448a418b3128be8bee14d9535e36c9 (diff) |
Be (somewhat more) consistent about the value of pi
Use M_PI in C++ and Math.PI in JavaScript (including QML).
Use qmath.h's value for M_PI where we can't avoid an explicit value.
Task-number: QTBUG-58083
Change-Id: Iabe938aff62ceac27b939ec33c6ee5e854aac15e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/manual/v4')
-rw-r--r-- | tests/manual/v4/typedarrays.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/v4/typedarrays.js b/tests/manual/v4/typedarrays.js index 8cf2b8c75a..f727df7185 100644 --- a/tests/manual/v4/typedarrays.js +++ b/tests/manual/v4/typedarrays.js @@ -670,12 +670,12 @@ function TestDataViewConstructor() { /* This is wrong according to ecma 6 and should throw: - var d4 = new DataView(ab, 1, 3.1415926); + var d4 = new DataView(ab, 1, Math.PI); assertSame(ab, d4.buffer); assertSame(1, d4.byteOffset); assertSame(3, d4.byteLength); */ - assertThrows(function() { new DataView(ab, 3.1415926); }, RangeError); + assertThrows(function() { new DataView(ab, Math.PI); }, RangeError); // error cases assertThrows(function() { new DataView(ab, -1); }, RangeError); |