llvmpipe: also test the new lp_build_assert() function
authorBrian Paul <brianp@vmware.com>
Thu, 29 Jul 2010 18:51:34 +0000 (12:51 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 29 Jul 2010 18:51:45 +0000 (12:51 -0600)
src/gallium/drivers/llvmpipe/lp_test_printf.c

index 62041f0301aaebd7c10994729e1c102a6d1e781c..a3447bf53f9782c2fc8180e9daaeb2fc212fa489 100644 (file)
@@ -32,6 +32,7 @@
 #include "util/u_pointer.h"
 #include "gallivm/lp_bld.h"
 #include "gallivm/lp_bld_init.h"
+#include "gallivm/lp_bld_assert.h"
 #include "gallivm/lp_bld_printf.h"
 
 #include <llvm-c/Analysis.h>
@@ -76,6 +77,9 @@ add_printf_test(LLVMModuleRef module)
    lp_build_printf(builder, "print 5 6: %d %d\n", LLVMConstInt(LLVMInt32Type(), 5, 0),
                                LLVMConstInt(LLVMInt32Type(), 6, 0));
 
+   /* Also test lp_build_assert().  This should not fail. */
+   lp_build_assert(builder, LLVMConstInt(LLVMInt32Type(), 1, 0), "assert(1)");
+
    LLVMBuildRetVoid(builder);
    LLVMDisposeBuilder(builder);
    return func;