2 # Copyright (C) 2010, Parrot Foundation.
7 t/pmc/imageio.t - test ImageIO PMC
11 % prove t/pmc/imagio.t
15 Tests the ImageIO PMC.
20 .include 'test_more.pir'
25 imageio = new ['ImageIO']
26 ok(1, 'instantiated ImageIO')
29 test_pmc = 'get_test_simple'()
30 setref imageio, test_pmc
32 ok($S0, 'frozen PMC is true (simple)')
34 is($S0, $S1, 'freeze gives same image as ImageIO (simple)')
36 imageio = new ['ImageIO']
39 ok($P0, 'thawed PMC is true (simple)')
41 is($P0, $P1, 'thaw gives same PMC as ImageIO (simple)')
42 is($P0, test_pmc, 'round trip gives same PMC (simple)')
44 imageio = new ['ImageIO']
45 test_pmc = 'get_test_aggregate'()
46 setref imageio, test_pmc
48 ok($S0, 'frozen PMC is true (aggregate)')
50 is($S0, $S1, 'freeze gives same image as ImageIO (aggregate)')
52 imageio = new ['ImageIO']
55 ok($P0, 'thawed PMC is true (aggregate)')
57 is_deeply($P0, $P1, 'thaw gives same PMC as ImageIO (aggregate)')
58 is_deeply($P0, test_pmc, 'round trip gives same PMC (aggregate)')
67 .sub get_test_aggregate
68 $P0 = new ['ResizableStringArray']
79 # vim: expandtab shiftwidth=4 ft=pir: