Commit graph

10 commits

Author SHA1 Message Date
Behdad Esfahbod
cf1b23a4c5 Add prototype for draw in each test file and remove it from the header. 2006-07-13 12:58:24 -04:00
Behdad Esfahbod
973d3a3d14 More test suite infrastructure improvements:
- Remove cairo_test_expect_failure.  cairo-test.c now checks
  env var CAIRO_XFAIL_TESTS to see if the running test is
  expected to fail.  The reason for expected failure is
  appended to the test description.
- Test description is written out.
- Failed/crashed tests also write a line out to stderr (in red),
  so one can now redirect stdout to /dev/null to only see failures.
- cairo_test() has been changed to not take the draw function
  anymore, instead, draw function is now part of the test struct.
- "make check" doesn't allow limiting backends to test using env
  var anymore.  To limit backends to test, one should use the
  TARGETS variable on the make command line.
- "make check-valgrind" now writes its log to valgrind-log instead
  of valgrind.log, to not interfere with test log file processing.
2006-07-11 22:19:39 -04:00
Carl Worth
a83124a3ee Fix so that one of three different error status values will be returned:
CAIRO_STATUS_NO_MEMORY CAIRO_STATUS_FILE_NOT_FOUND CAIRO_STATUS_READ_ERROR
Add new CAIRO_STATUS_FILE_NOT_FOUND.
Add new _cairo_surface_nil_read_error and _cairo_surface_nil_file_not_found.
Test the new FILE_NOT_FOUND error.
2005-07-28 10:41:08 +00:00
Carl Worth
8cb451962b Fix typo that caused cairo_image_surface_create_from_png_stream to segfault. Closes bug #3863 (thanks to Steve Chaplin).
Add a test to actually call cairo_image_surface_create_from_png_stream.
2005-07-27 09:23:29 +00:00
Carl Worth
574b702029 Rename create-for-png test to create-from-png to match the naming of the cairo_image_surface_create_from_png function. 2005-07-14 11:17:12 +00:00
Carl Worth
b05c85eafb Removing mucking around with stderr and add a cairo_test_log function instead.
Switch all error messages from fprintf(stderr,...) to cairo_test_log(...).
2005-05-10 20:25:38 +00:00
Carl Worth
05ccd76854 Originally 2005-04-20 Carl Worth <cworth@cworth.org>
Remove cairo_show_surface. Add new cairo_set_source_surface.
Remove _cairo_gstate_show_surface.
Replace calls to cairo_show_surface with cairo_set_source_surface; cairo_paint.
Fix messages to prefer - over _.
Fix documentation.
Three new tests to exercise set_source_surface more completely, (two of these are expected failures dues to outstanding bugs).
2005-05-03 08:33:32 +00:00
Carl Worth
618792c8c0 Add very simple test to generate PDF output, (no automated verification yet).
Track PNG interface changes, (no more include of cairo-png.h, cairo_surface_write_png renamed to cairo_surface_write_to_png).
2005-04-26 09:43:39 +00:00
Kristian Høgsberg
87009d692b Factor out bulk of the code into a new callback based function, write_png(). Call it with a stdio write callback. (cairo_surface_write_png_to_stream): New function to write a surface to a PNG stream. (cairo_image_surface_create_from_png): Likewise, move most of the code to read_png(), clean up error handling and reduce this function to calling read_png() with a stdio based read function. (cairo_image_surface_create_from_png_stream): New function to create an image surface from a PNG stream.
New functions to get widht and height of an image surface.
Add new prototype and error codes.
Adjust to new PNG API.
2005-04-25 20:42:54 +00:00
Carl Worth
a6d9b6a671 Change type of data parameter from char* to unsigned char*.
Propagate the unsigned char* change down the stack.
Add cast since XImage uses char* rather than unsigned char*.
Fix memory leak of image data.
Switch to use cairo_surface_write_png rather than a custom write_png_argb32.
Add test to exercise the cairo_image_surface_create_for_png function.
2005-04-04 09:47:12 +00:00