summaryrefslogtreecommitdiff
path: root/installed-tests
diff options
context:
space:
mode:
authortuberry <17917040+tuberry@users.noreply.github.com>2022-11-21 21:15:14 +0800
committertuberry <17917040+tuberry@users.noreply.github.com>2022-11-21 21:41:05 +0800
commitcff70ffcf5493743a71f313abb83528a5c4cb488 (patch)
treecd5f56a3c8952b8caa1956f00203d140b1b10b16 /installed-tests
parentf547e2da1a7d06784910aac1f6c25badbefb3193 (diff)
downloadgjs-cff70ffcf5493743a71f313abb83528a5c4cb488.tar.gz
cairo-surface: Add finish() and flush()
closes #515
Diffstat (limited to 'installed-tests')
-rw-r--r--installed-tests/js/testCairo.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/installed-tests/js/testCairo.js b/installed-tests/js/testCairo.js
index c0c6d119..e9ede59f 100644
--- a/installed-tests/js/testCairo.js
+++ b/installed-tests/js/testCairo.js
@@ -283,6 +283,20 @@ describe('Cairo', function () {
expect(x).toEqual(50);
expect(y).toEqual(50);
});
+
+ it('can be finalized', function () {
+ expect(() => {
+ let _surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 10, 10);
+ let _cr = new Cairo.Context(_surface);
+ _surface.finish();
+ _cr.stroke();
+ }).toThrow();
+ expect(() => {
+ let _surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 10, 10);
+ _surface.finish();
+ _surface.flush();
+ }).not.toThrow();
+ });
});
describe('GI test suite', function () {