1 /** 2 A module with tests to test the compile-time reflection 3 */ 4 5 module unit_threaded.ut.modules.module_with_tests; 6 7 import unit_threaded.runner.attrs; 8 9 import std.meta; 10 import unit_threaded.should; 11 12 //test functions 13 void testFoo() {} 14 void testBar() {} 15 private void testPrivate() { } //should not show up 16 17 //non-test functions 18 private void someFun() {} 19 private void testosterone() {} 20 private void tes() {} 21 22 //non-test non-functions 23 int testInt; 24 25 //non-test classes 26 class NotATest { void tes() { } } 27 class AlsoNotATest { void testosterone() { } } 28 29 @HiddenTest void withHidden() {} 30 void withoutHidden() { } 31 32 //other non-test members 33 alias seq = AliasSeq!(int, float, string); 34 35 36 unittest { 37 //1st block 38 assert(true); 39 } 40 41 unittest { 42 //2nd block 43 assert(true); 44 } 45 46 @Name("myUnitTest") 47 unittest { 48 assert(true); 49 } 50 51 struct StructWithUnitTests{ 52 alias SelfSoDontRecurseForever = StructWithUnitTests; 53 54 @Name("InStruct") 55 unittest{ 56 assert(false); 57 } 58 unittest{ 59 // 2nd inner block. 60 assert(true); 61 } 62 } 63 64 // github issue #26 - template instance GetTypes!uint does not match template declaration 65 alias RGB = uint;