| 14 | // Sometimes tests pass if we are comparing two inaccurate values in JS with |
| 15 | // each other. That's fine for now. Then we just have to suppress the warnings. |
| 16 | function warn64(func, ...args) { |
| 17 | GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_WARNING, |
| 18 | '*cannot be safely stored*'); |
| 19 | const ret = func(...args); |
| 20 | const error = new Error(); |
| 21 | GLib.test_assert_expected_messages_internal('Gjs', |
| 22 | error.fileName, error.lineNumber, 'warn64'); |
| 23 | return ret; |
| 24 | } |
| 25 | |
| 26 | const MyObject = GObject.registerClass({ |
| 27 | Properties: { |