| author | |
| committer | |
| log | f80c01f9d8367ee904d8e01666cd6136dafd6213 |
| tree | 716527e403f2464f9feb627f976e604c29ec556d |
| parent | 7598a579ff5f4db43a53c4a466b4b37263726b4b |
| signature |
3 files changed, 10 insertions(+), 113 deletions(-)
lib/std/math.zig+2-48| ... | @@ -202,54 +202,8 @@ pub const Complex = complex.Complex; | ... | @@ -202,54 +202,8 @@ pub const Complex = complex.Complex; |
| 202 | 202 | ||
| 203 | pub const big = @import("math/big.zig"); | 203 | pub const big = @import("math/big.zig"); |
| 204 | 204 | ||
| 205 | test "math" { | 205 | comptime { |
| 206 | _ = @import("math/nan.zig"); | 206 | std.meta.refAllDecls(@This()); |
| 207 | _ = @import("math/isnan.zig"); | ||
| 208 | _ = @import("math/fabs.zig"); | ||
| 209 | _ = @import("math/ceil.zig"); | ||
| 210 | _ = @import("math/floor.zig"); | ||
| 211 | _ = @import("math/trunc.zig"); | ||
| 212 | _ = @import("math/round.zig"); | ||
| 213 | _ = @import("math/frexp.zig"); | ||
| 214 | _ = @import("math/modf.zig"); | ||
| 215 | _ = @import("math/copysign.zig"); | ||
| 216 | _ = @import("math/isfinite.zig"); | ||
| 217 | _ = @import("math/isinf.zig"); | ||
| 218 | _ = @import("math/isnormal.zig"); | ||
| 219 | _ = @import("math/signbit.zig"); | ||
| 220 | _ = @import("math/scalbn.zig"); | ||
| 221 | _ = @import("math/pow.zig"); | ||
| 222 | _ = @import("math/powi.zig"); | ||
| 223 | _ = @import("math/sqrt.zig"); | ||
| 224 | _ = @import("math/cbrt.zig"); | ||
| 225 | _ = @import("math/acos.zig"); | ||
| 226 | _ = @import("math/asin.zig"); | ||
| 227 | _ = @import("math/atan.zig"); | ||
| 228 | _ = @import("math/atan2.zig"); | ||
| 229 | _ = @import("math/hypot.zig"); | ||
| 230 | _ = @import("math/exp.zig"); | ||
| 231 | _ = @import("math/exp2.zig"); | ||
| 232 | _ = @import("math/expm1.zig"); | ||
| 233 | _ = @import("math/ilogb.zig"); | ||
| 234 | _ = @import("math/ln.zig"); | ||
| 235 | _ = @import("math/log.zig"); | ||
| 236 | _ = @import("math/log2.zig"); | ||
| 237 | _ = @import("math/log10.zig"); | ||
| 238 | _ = @import("math/log1p.zig"); | ||
| 239 | _ = @import("math/fma.zig"); | ||
| 240 | _ = @import("math/asinh.zig"); | ||
| 241 | _ = @import("math/acosh.zig"); | ||
| 242 | _ = @import("math/atanh.zig"); | ||
| 243 | _ = @import("math/sinh.zig"); | ||
| 244 | _ = @import("math/cosh.zig"); | ||
| 245 | _ = @import("math/tanh.zig"); | ||
| 246 | _ = @import("math/sin.zig"); | ||
| 247 | _ = @import("math/cos.zig"); | ||
| 248 | _ = @import("math/tan.zig"); | ||
| 249 | |||
| 250 | _ = @import("math/complex.zig"); | ||
| 251 | |||
| 252 | _ = @import("math/big.zig"); | ||
| 253 | } | 207 | } |
| 254 | 208 | ||
| 255 | pub fn floatMantissaBits(comptime T: type) comptime_int { | 209 | pub fn floatMantissaBits(comptime T: type) comptime_int { |
lib/std/meta.zig+6| ... | @@ -552,3 +552,9 @@ pub fn fieldIndex(comptime T: type, comptime name: []const u8) ?comptime_int { | ... | @@ -552,3 +552,9 @@ pub fn fieldIndex(comptime T: type, comptime name: []const u8) ?comptime_int { |
| 552 | } | 552 | } |
| 553 | return null; | 553 | return null; |
| 554 | } | 554 | } |
| 555 | |||
| 556 | /// Given a type, reference all the declarations inside, so that the semantic analyzer sees them. | ||
| 557 | pub fn refAllDecls(comptime T: type) void { | ||
| 558 | if (!builtin.is_test) return; | ||
| 559 | _ = declarations(T); | ||
| 560 | } |
lib/std/std.zig+2-65| ... | @@ -62,69 +62,6 @@ pub const unicode = @import("unicode.zig"); | ... | @@ -62,69 +62,6 @@ pub const unicode = @import("unicode.zig"); |
| 62 | pub const valgrind = @import("valgrind.zig"); | 62 | pub const valgrind = @import("valgrind.zig"); |
| 63 | pub const zig = @import("zig.zig"); | 63 | pub const zig = @import("zig.zig"); |
| 64 | 64 | ||
| 65 | // Reference everything so it gets tested. | 65 | comptime { |
| 66 | test "" { | 66 | meta.refAllDecls(@This()); |
| 67 | _ = AlignedArrayList; | ||
| 68 | _ = ArrayList; | ||
| 69 | _ = AutoHashMap; | ||
| 70 | _ = BloomFilter; | ||
| 71 | _ = BufMap; | ||
| 72 | _ = BufSet; | ||
| 73 | _ = Buffer; | ||
| 74 | _ = BufferOutStream; | ||
| 75 | _ = DynLib; | ||
| 76 | _ = HashMap; | ||
| 77 | _ = Mutex; | ||
| 78 | _ = PackedIntArrayEndian; | ||
| 79 | _ = PackedIntArray; | ||
| 80 | _ = PackedIntSliceEndian; | ||
| 81 | _ = PackedIntSlice; | ||
| 82 | _ = PriorityQueue; | ||
| 83 | _ = SinglyLinkedList; | ||
| 84 | _ = StaticallyInitializedMutex; | ||
| 85 | _ = SegmentedList; | ||
| 86 | _ = SpinLock; | ||
| 87 | _ = StringHashMap; | ||
| 88 | _ = ChildProcess; | ||
| 89 | _ = TailQueue; | ||
| 90 | _ = Thread; | ||
| 91 | |||
| 92 | _ = atomic; | ||
| 93 | _ = base64; | ||
| 94 | _ = build; | ||
| 95 | _ = c; | ||
| 96 | _ = coff; | ||
| 97 | _ = crypto; | ||
| 98 | _ = cstr; | ||
| 99 | _ = debug; | ||
| 100 | _ = dwarf; | ||
| 101 | _ = elf; | ||
| 102 | _ = event; | ||
| 103 | _ = fmt; | ||
| 104 | _ = fs; | ||
| 105 | _ = hash; | ||
| 106 | _ = hash_map; | ||
| 107 | _ = heap; | ||
| 108 | _ = http; | ||
| 109 | _ = io; | ||
| 110 | _ = json; | ||
| 111 | _ = lazyInit; | ||
| 112 | _ = macho; | ||
| 113 | _ = math; | ||
| 114 | _ = mem; | ||
| 115 | _ = meta; | ||
| 116 | _ = net; | ||
| 117 | _ = os; | ||
| 118 | _ = packed_int_array; | ||
| 119 | _ = pdb; | ||
| 120 | _ = process; | ||
| 121 | _ = rand; | ||
| 122 | _ = rb; | ||
| 123 | _ = sort; | ||
| 124 | _ = ascii; | ||
| 125 | _ = testing; | ||
| 126 | _ = time; | ||
| 127 | _ = unicode; | ||
| 128 | _ = valgrind; | ||
| 129 | _ = zig; | ||
| 130 | } | 67 | } |