Home  |  Linux  | Mysql  | PHP  | XML
From:Takeshi Abe Date:Thu Aug 14 04:45:42 2008
Subject:cvs: gd /libgd/tests/xpm CMakeLists.txt Makefile.am bug00166.c bug00166.xpm
tabe		Thu Aug 14 10:45:42 2008 UTC

  Added files:                 
    /gd/libgd/tests/xpm	CMakeLists.txt Makefile.am bug00166.c 
                       	bug00166.xpm 
  Log:
  (supplement) fixed FS#166: 
  * added test subdirectory 'xpm'
  
  

http://cvs.php.net/viewvc.cgi/gd/libgd/tests/xpm/CMakeLists.txt?view=markup&rev=1.1
Index: gd/libgd/tests/xpm/CMakeLists.txt
+++ gd/libgd/tests/xpm/CMakeLists.txt

SET(TESTS_FILES
	bug00166
)

FOREACH(test_name ${TESTS_FILES})
	add_executable(${test_name} "${test_name}.c")
	target_link_libraries (${test_name} gdTest ${GD_LIB})
	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
ENDFOREACH(test_name)

http://cvs.php.net/viewvc.cgi/gd/libgd/tests/xpm/Makefile.am?view=markup&rev=1.1
Index: gd/libgd/tests/xpm/Makefile.am
+++ gd/libgd/tests/xpm/Makefile.am
## Process this file with automake to produce Makefile.in -*-Makefile-*-

EXTRA_DIST = CMakeLists.txt bug00166.c bug00166.xpm

http://cvs.php.net/viewvc.cgi/gd/libgd/tests/xpm/bug00166.c?view=markup&rev=1.1
Index: gd/libgd/tests/xpm/bug00166.c
+++ gd/libgd/tests/xpm/bug00166.c
/* $Id: bug00166.c,v 1.1 2008/08/14 10:45:42 tabe Exp $ */
#include "gd.h"
#include <stdio.h>
#include <stdlib.h>
#include "gdtest.h"

int
main(int argc, char *argv[])
{
  gdImagePtr im;
  char path[1024];
  int c, result;

  sprintf(path, "%s/xpm/bug00166.xpm", GDTEST_TOP_DIR);
  im = gdImageCreateFromXpm(path);
  if (!im) {
    return 2;
  }
  c = gdImageGetPixel(im, 1, 1);
  if (gdImageRed(im, c)      == 0xAA
      && gdImageGreen(im, c) == 0xBB
      && gdImageBlue(im, c)  == 0xCC) {
    result = 0;
  } else {
    result = 1;
  }
  gdImageDestroy(im);
  return result;
}

http://cvs.php.net/viewvc.cgi/gd/libgd/tests/xpm/bug00166.xpm?view=markup&rev=1.1
Index: gd/libgd/tests/xpm/bug00166.xpm
+++ gd/libgd/tests/xpm/bug00166.xpm
/* XPM */
static char * a[] = {
/* width height colors cpp */
"4 4 3 1",
"  c None",
"@ c #abc",
". c #def",
/* pixels */
" .. ",
".@@.",
".@@.",
" .. "};


Navigate in group php.gd.cvs at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants