search for: test_struct

Displaying 3 results from an estimated 3 matches for "test_struct".

2012 Sep 13
1
[LLVMdev] Parsing C++ template parameters using cindex.py
...(the TYPE_REF node seen in the example below), but this is not the case with for example int. Any hint on where the template type is located for int/float/etc? /joel de vahl Example code: template <typename T> class Test { T test; }; struct S { }; Test<int> test_int; Test<S> test_struct; Tree dump script: def DeepPrintType(node, depth = 0): tabs = " " * depth print tabs + "type" print tabs + " kind", node.kind def DeepPrint(node, depth = 0): tabs = " " * depth print tabs + "cursor", node.spelling print ta...
2011 Jun 20
3
[LLVMdev] C struct as function argument
I've been working on a wrapper for LLVM's C++ API to use from Objective-C for a scripting language I'm working on. I currently have an issue with passing arguments to a function that takes a struct argument. typedef struct _test_struct { int x; int y; } test_struct; id testLLVMStructFuncCall(test_struct x) { NSLog(@"%d %d",x.x,x.y); return N(x.x + x.y); } -(void) testLLVMStructFuncCall { CGKModule* myMod = [CGKModule moduleWithName:@"llvm_structfunccall_test"]; CGKType* testStructType...
2013 Sep 20
3
[PATCH] preload_app can take an optional block for warmup
...diff --git a/test/unit/test_configurator.rb b/test/unit/test_configurator.rb index 1298f0e..8a1a68e 100644 --- a/test/unit/test_configurator.rb +++ b/test/unit/test_configurator.rb @@ -172,4 +172,12 @@ class TestConfigurator < Test::Unit::TestCase end end + def test_preload_app + test_struct = TestStruct.new + [ true, false, proc { |a| }, Proc.new { |a| }, lambda { |a| } ].each do |my_proc| + Unicorn::Configurator.new(:preload_app => my_proc).commit!(test_struct) + assert_equal my_proc, test_struct.preload_app + end + end + end -- 1.8.3.4 ________________________...