Compare a806e1f ... +5 ... 119be89

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 3 of 5 files from the diff.

@@ -6,7 +6,7 @@
Loading
6 6
// druntime, to allow for destruction attribute inference
7 7
8 8
void destruct(T)(T obj) if (is(T == class)) {
9 -
    (cast(_finalizeType!T) &rt_finalize)(cast(void*) obj);
9 +
    (cast(_finalizeType!T) &rt_finalize)(() @trusted { return cast(void*) obj; }());
10 10
}
11 11
12 12
void destruct(T)(T obj) if (is(T == interface)) {
@@ -46,7 +46,7 @@
Loading
46 46
    import std.conv: text;
47 47
48 48
    struct A { ~this() @nogc {} }
49 -
    struct B { ~this() {} }
49 +
    struct B { ~this() { new int; } }
50 50
    class CA { A a; ~this() @nogc {} }
51 51
    class CB { B b; ~this() @nogc {} }
52 52
@@ -56,7 +56,7 @@
Loading
56 56
57 57
private:
58 58
59 -
extern(C) void rt_finalize(void* p, bool det = true);
59 +
extern(C) void rt_finalize(void* p, bool det = true) @trusted @nogc pure;
60 60
61 61
// A slightly better hack than the one presented by
62 62
// https://www.auburnsounds.com/blog/2016-11-10_Running-D-without-its-runtime.html
@@ -67,12 +67,13 @@
Loading
67 67
// have weaker set of destruction attributes.
68 68
extern(C)
69 69
template _finalizeType(T) {
70 -
    static if (is(T == Object)) {
70 +
    import std.traits: Unqual;
71 +
    static if (is(Unqual!T == Object)) {
71 72
        alias _finalizeType = typeof(&rt_finalize);
72 73
    } else {
73 74
        import std.traits : BaseClassesTuple;
74 75
        import std.meta : AliasSeq;
75 -
        alias _finalizeType = typeof((void* p, bool det = true) {
76 +
        alias _finalizeType = typeof(function void(void* p, bool det = true) {
76 77
            // generate a body that calls all the destructors in the chain,
77 78
            // compiler should infer the intersection of attributes
78 79
            foreach (B; AliasSeq!(T, BaseClassesTuple!T)) {

@@ -6,8 +6,7 @@
Loading
6 6
7 7
Allocators are template arguments instead of using `theAllocator` so
8 8
that these smart pointers can be used in `@nogc` code. However, they
9 -
will default to `typeof(theAllocator)` for simplicity. The examples
10 -
above will be explicit.
9 +
will default to `typeof(theAllocator)` for simplicity.
11 10
12 11
Another reason to have to pass in the type of allocator is to decide how it is to
13 12
be stored. Stateless allocators can be "stored" by value and imply zero-cost `Unique` pointers.

@@ -73,3 +73,36 @@
Loading
73 73
    auto rc = RefCounted!S();
74 74
    rc.front.shouldThrow!AssertError;
75 75
}
76 +
77 +
78 +
version(unitThreadedLight) {}
79 +
else {
80 +
    @HiddenTest
81 +
    @("51")
82 +
    @system unittest {
83 +
84 +
        import std.experimental.allocator: allocatorObject;
85 +
        import std.experimental.allocator.mallocator: Mallocator;
86 +
87 +
        static interface Interface {
88 +
            void hello();
89 +
            string test();
90 +
        }
91 +
92 +
        static class Oops: Interface {
93 +
            private ubyte[] _buffer;
94 +
            override void hello() {}
95 +
            override string test() { return "foo"; }
96 +
            this() { _buffer.length = 1024 * 1024; }
97 +
            ~this() {}
98 +
99 +
            static Oops opCall() {
100 +
                import std.experimental.allocator: theAllocator, make;
101 +
                return theAllocator.make!Oops;
102 +
            }
103 +
        }
104 +
105 +
        Vector!Interface interfaces;
106 +
        foreach(i; 0 .. 12) interfaces ~= Oops();
107 +
    }
108 +
}

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
source/automem -0.37% 97.74%
tests/ut 99.44%
Project Totals (11 files) 98.88%
Loading