From: <tj...@us...> - 2010-09-03 09:23:28
|
Revision: 13690 http://alleg.svn.sourceforge.net/alleg/?rev=13690&view=rev Author: tjaden Date: 2010-09-03 09:23:22 +0000 (Fri, 03 Sep 2010) Log Message: ----------- Add al_save_bitmap tests. Modified Paths: -------------- allegro/branches/4.9/tests/test_driver.c allegro/branches/4.9/tests/test_image.ini Modified: allegro/branches/4.9/tests/test_driver.c =================================================================== --- allegro/branches/4.9/tests/test_driver.c 2010-09-03 09:22:52 UTC (rev 13689) +++ allegro/branches/4.9/tests/test_driver.c 2010-09-03 09:23:22 UTC (rev 13690) @@ -818,6 +818,12 @@ (*bmp) = load_relative_bitmap(V(0)); continue; } + if (SCAN("al_save_bitmap", 2)) { + if (!al_save_bitmap(V(0), B(1))) { + error("failed to save %s", V(0)); + } + continue; + } if (SCAN("al_hold_bitmap_drawing", 1)) { al_hold_bitmap_drawing(get_bool(V(0))); Modified: allegro/branches/4.9/tests/test_image.ini =================================================================== --- allegro/branches/4.9/tests/test_image.ini 2010-09-03 09:22:52 UTC (rev 13689) +++ allegro/branches/4.9/tests/test_image.ini 2010-09-03 09:23:22 UTC (rev 13690) @@ -1,3 +1,6 @@ +[bitmaps] +allegro=../examples/data/allegro.pcx + [template] op0=al_clear_to_color(brown) op1=b = al_load_bitmap(filename) @@ -28,3 +31,35 @@ extend=template filename=../examples/data/fixed_font.tga hash=3141f2b4 + + +[save template] +op0=al_save_bitmap(filename, allegro) +op1=b = al_load_bitmap(filename) +op2=al_clear_to_color(brown) +op3=al_draw_bitmap(b, 0, 0, 0) + +[test save bmp] +extend=save template +filename=tmp.bmp +hash=c44929e5 + +[test save jpg] +extend=save template +filename=tmp.jpg +sig=jdelWKKKKaYmeXKKKKLNVNKKKKKHHHLLKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK + +[test save pcx] +extend=save template +filename=tmp.pcx +hash=c44929e5 + +[test save png] +extend=save template +filename=tmp.png +hash=c44929e5 + +[test save tga] +extend=save template +filename=tmp.tga +hash=c44929e5 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |