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/gdimageline | |
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/gdimageline')
-rw-r--r-- | tests/gdimageline/bug00315.c | 76 |
1 files changed, 37 insertions, 39 deletions
diff --git a/tests/gdimageline/bug00315.c b/tests/gdimageline/bug00315.c index 7c94e41..719d155 100644 --- a/tests/gdimageline/bug00315.c +++ b/tests/gdimageline/bug00315.c @@ -1,39 +1,37 @@ -/**
- * Regression test for <https://github.com/libgd/libgd/issues/315>
- *
- * We're testing that a single-pointed gdImageAALine() is drawn as a single
- * non-antialized pixel, according to (two-pointed) vertical and horizontal
- * lines.
- */
-
-
-#include "gd.h"
-#include "gdtest.h"
-
-
-int main()
-{
- gdImagePtr im;
- int white, black;
- char *path;
-
- im = gdImageCreateTrueColor(6, 6);
- white = gdImageColorAllocate(im, 255, 255, 255);
- black = gdImageColorAllocate(im, 0, 0, 0);
- gdImageFilledRectangle(im, 0,0, 5,5, white);
-
- gdImageLine(im, 4,4, 4,4, black);
- gdImageLine(im, 1,4, 2,4, black);
- gdImageLine(im, 4,1, 4,2, black);
-
- gdImageSetAntiAliased(im, black);
- gdImageLine(im, 1,1, 1,1, gdAntiAliased);
-
- path = gdTestFilePath2("gdimageline", "bug00315_exp.png");
- gdAssertImageEqualsToFile(path, im);
- gdFree(path);
-
- gdImageDestroy(im);
-
- return gdNumFailures();
-}
+/** + * Regression test for <https://github.com/libgd/libgd/issues/315> + * + * We're testing that a single-pointed gdImageAALine() is drawn as a single + * non-antialized pixel, according to (two-pointed) vertical and horizontal + * lines. + */ + +#include "gd.h" +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + int white, black; + char *path; + + im = gdImageCreateTrueColor(6, 6); + white = gdImageColorAllocate(im, 255, 255, 255); + black = gdImageColorAllocate(im, 0, 0, 0); + gdImageFilledRectangle(im, 0,0, 5,5, white); + + gdImageLine(im, 4,4, 4,4, black); + gdImageLine(im, 1,4, 2,4, black); + gdImageLine(im, 4,1, 4,2, black); + + gdImageSetAntiAliased(im, black); + gdImageLine(im, 1,1, 1,1, gdAntiAliased); + + path = gdTestFilePath2("gdimageline", "bug00315_exp.png"); + gdAssertImageEqualsToFile(path, im); + gdFree(path); + + gdImageDestroy(im); + + return gdNumFailures(); +} |