Skip to content

Commit

Permalink
libepoxy: Fix testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
scoopr committed Feb 18, 2015
1 parent 9d00df7 commit ae259fa
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Library/Formula/libepoxy.rb
Expand Up @@ -36,13 +36,27 @@ def install

test do
(testpath/"test.c").write <<-EOS.undent
#include <epoxy/gl.h>
int main() {
glClear(GL_COLOR_BUFFER_BIT);
return 0;
#include <OpenGL/CGLContext.h>
#include <OpenGL/CGLTypes.h>
int main()
{
CGLPixelFormatAttribute attribs[] = {0};
CGLPixelFormatObj pix;
int npix;
CGLContextObj ctx;
CGLChoosePixelFormat( attribs, &pix, &npix );
CGLCreateContext(pix, (void*)0, &ctx);
glClear(GL_COLOR_BUFFER_BIT);
CGLReleasePixelFormat(pix);
CGLReleaseContext(pix);
return 0;
}
EOS
system ENV.cc, "test.c", "-lepoxy", "-o", "test"
system ENV.cc, "test.c", "-lepoxy", "-framework", "OpenGL", "-o", "test"
system "ls", "-lh", "test"
system "file", "test"
system "./test"
Expand Down

0 comments on commit ae259fa

Please sign in to comment.