diff options
Diffstat (limited to 'tests/extmod/framebuf1.py')
| -rw-r--r-- | tests/extmod/framebuf1.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/extmod/framebuf1.py b/tests/extmod/framebuf1.py index 7f09050b0..cdc7e5b18 100644 --- a/tests/extmod/framebuf1.py +++ b/tests/extmod/framebuf1.py @@ -48,11 +48,21 @@ fbuf.fill(0) fbuf.rect(1, 1, 3, 3, 1) print('rect', buf) +#fill rect +fbuf.fill(0) +fbuf.fill_rect(1, 1, 3, 3, 1) +print('fill_rect', buf) + # line fbuf.fill(0) fbuf.line(1, 1, 3, 3, 1) print('line', buf) +# line steep negative gradient +fbuf.fill(0) +fbuf.line(3, 3, 2, 1, 1) +print('line', buf) + # scroll fbuf.fill(0) fbuf.pixel(2, 7, 1) @@ -78,6 +88,12 @@ print(buf) fbuf.text(str(chr(31)), 0, 0) print(buf) +# test invalid constructor +try: + fbuf = framebuf.FrameBuffer(buf, w, h, 2, framebuf.MVLSB) +except ValueError: + print("ValueError") + # test legacy constructor fbuf = framebuf.FrameBuffer1(buf, w, h) fbuf = framebuf.FrameBuffer1(buf, w, h, w) |
