diff options
author | Mike Frysinger <vapier@gentoo.org> | 2018-06-21 21:44:54 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2018-06-21 21:44:54 -0400 |
commit | aac77143ddeb561216d9fe63546d17a1d2156bae (patch) | |
tree | 37e53e5369364f319bc95e3ed708eb5a3266cd17 /tests/xbm | |
parent | c4ee95d1a403061707c17dcae0343ad059e08d2f (diff) | |
download | libgd-aac77143ddeb561216d9fe63546d17a1d2156bae.tar.gz |
convert all files to native line encodings
A bunch of these files were committed with Windows line encodings.
Strip all those ^M gremlins out as people working on Windows can
use git's autocrlf setting to convert back and forth as needed.
Diffstat (limited to 'tests/xbm')
-rw-r--r-- | tests/xbm/github_bug_109.c | 68 | ||||
-rw-r--r-- | tests/xbm/x10_basic_read.c | 62 |
2 files changed, 63 insertions, 67 deletions
diff --git a/tests/xbm/github_bug_109.c b/tests/xbm/github_bug_109.c index 1a020c6..70b7937 100644 --- a/tests/xbm/github_bug_109.c +++ b/tests/xbm/github_bug_109.c @@ -1,35 +1,33 @@ -/**
- * Test reading of XBM images with a width that is not a multiple of 8
- *
- * We're reading such an XBM image, and check that we got what we've expected,
- * instead of an error message.
- *
- * See also <https://github.com/libgd/libgd/issues/109>.
- */
-
-
-#include "gd.h"
-#include "gdtest.h"
-
-
-int main()
-{
- gdImagePtr im;
- FILE *fp;
- char *path;
-
- fp = gdTestFileOpen2("xbm", "github_bug_109.xbm");
- im = gdImageCreateFromXbm(fp);
- fclose(fp);
- gdTestAssert(im != NULL);
- gdTestAssert(gdImageGetTrueColorPixel(im, 0, 0) == 0);
- gdTestAssert(gdImageGetTrueColorPixel(im, 0, 1) == 0xffffff);
-
- path = gdTestFilePath2("xbm", "github_bug_109_exp.png");
- gdAssertImageEqualsToFile(path, im);
- gdFree(path);
-
- gdImageDestroy(im);
-
- return gdNumFailures();
-}
+/** + * Test reading of XBM images with a width that is not a multiple of 8 + * + * We're reading such an XBM image, and check that we got what we've expected, + * instead of an error message. + * + * See also <https://github.com/libgd/libgd/issues/109>. + */ + +#include "gd.h" +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + FILE *fp; + char *path; + + fp = gdTestFileOpen2("xbm", "github_bug_109.xbm"); + im = gdImageCreateFromXbm(fp); + fclose(fp); + gdTestAssert(im != NULL); + gdTestAssert(gdImageGetTrueColorPixel(im, 0, 0) == 0); + gdTestAssert(gdImageGetTrueColorPixel(im, 0, 1) == 0xffffff); + + path = gdTestFilePath2("xbm", "github_bug_109_exp.png"); + gdAssertImageEqualsToFile(path, im); + gdFree(path); + + gdImageDestroy(im); + + return gdNumFailures(); +} diff --git a/tests/xbm/x10_basic_read.c b/tests/xbm/x10_basic_read.c index fb643cf..f7c505e 100644 --- a/tests/xbm/x10_basic_read.c +++ b/tests/xbm/x10_basic_read.c @@ -1,32 +1,30 @@ -/**
- * Test reading of an X10 style XBM file
- *
- * X10 style XBMs define a short[] instead of a char[] array. We're testing
- * that such files are read correctly, particularly regarding the line padding,
- * which is 2 bytes instead of 1, and the endianess.
- */
-
-
-#include "gd.h"
-#include "gdtest.h"
-
-
-int main()
-{
- gdImagePtr im;
- FILE *fp;
- char *path;
-
- fp = gdTestFileOpen2("xbm", "x10_basic_read.xbm");
- im = gdImageCreateFromXbm(fp);
- fclose(fp);
- gdTestAssert(im != NULL);
-
- path = gdTestFilePath2("xbm", "x10_basic_read_exp.png");
- gdAssertImageEqualsToFile(path, im);
- gdFree(path);
-
- gdImageDestroy(im);
-
- return gdNumFailures();
-}
+/** + * Test reading of an X10 style XBM file + * + * X10 style XBMs define a short[] instead of a char[] array. We're testing + * that such files are read correctly, particularly regarding the line padding, + * which is 2 bytes instead of 1, and the endianess. + */ + +#include "gd.h" +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + FILE *fp; + char *path; + + fp = gdTestFileOpen2("xbm", "x10_basic_read.xbm"); + im = gdImageCreateFromXbm(fp); + fclose(fp); + gdTestAssert(im != NULL); + + path = gdTestFilePath2("xbm", "x10_basic_read_exp.png"); + gdAssertImageEqualsToFile(path, im); + gdFree(path); + + gdImageDestroy(im); + + return gdNumFailures(); +} |