Skip to content

Commit

Permalink
Merge pull request #2 from chickensoft-games/fix/code-coverage
Browse files Browse the repository at this point in the history
fix: exclude generated members from coverage
  • Loading branch information
jolexxa authored Jun 8, 2024
2 parents a94416f + 9d58e9f commit 281a55f
Show file tree
Hide file tree
Showing 59 changed files with 639 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,48 @@ namespace OtherNamespace.Altogether;

partial class A {
partial class ChildBaseFullyQualified : Chickensoft.Introspection.IIntrospective {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new();

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(ChildBaseFullyQualified))).Metatype;

public class MetatypeMetadata : Chickensoft.Introspection.IMetatype {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Type Type => typeof(ChildBaseFullyQualified);
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool HasInitProperties { get; } = true;

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() {
[typeof(MetaAttribute)] = new System.Attribute[] {
new MetaAttribute()
}
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() {
};


[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) {
args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseFullyQualified requires init args.");
return new ChildBaseFullyQualified() {
Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default!
};
}
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override bool Equals(object obj) => true;
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override int GetHashCode() => base.GetHashCode();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,48 @@ namespace AliasedStuff.Nested;
using Y = OtherNamespace.Altogether.A.B;

partial class Child : Chickensoft.Introspection.IIntrospective {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new();

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(Child))).Metatype;

public class MetatypeMetadata : Chickensoft.Introspection.IMetatype {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Type Type => typeof(Child);
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool HasInitProperties { get; } = true;

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() {
[typeof(MetaAttribute)] = new System.Attribute[] {
new MetaAttribute()
}
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() {
};


[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) {
args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing Child requires init args.");
return new Child() {
Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default!
};
}
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override bool Equals(object obj) => true;
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override int GetHashCode() => base.GetHashCode();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,48 @@ namespace AliasedStuff.Nested;
using Y = OtherNamespace.Altogether.A.B;

partial class Child2 : Chickensoft.Introspection.IIntrospective {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new();

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(Child2))).Metatype;

public class MetatypeMetadata : Chickensoft.Introspection.IMetatype {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Type Type => typeof(Child2);
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool HasInitProperties { get; } = true;

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() {
[typeof(MetaAttribute)] = new System.Attribute[] {
new MetaAttribute()
}
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() {
};


[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) {
args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing Child2 requires init args.");
return new Child2() {
Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default!
};
}
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override bool Equals(object obj) => true;
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override int GetHashCode() => base.GetHashCode();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,45 @@ namespace AliasedStuff.Nested;
using Y = OtherNamespace.Altogether.A.B;

partial class DirectChild : Chickensoft.Introspection.IIntrospective {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new();

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(DirectChild))).Metatype;

public class MetatypeMetadata : Chickensoft.Introspection.IMetatype {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Type Type => typeof(DirectChild);
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool HasInitProperties { get; } = false;

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() {
[typeof(MetaAttribute)] = new System.Attribute[] {
new MetaAttribute()
}
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() {
};


[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) {
return new DirectChild();
}
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override bool Equals(object obj) => true;
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override int GetHashCode() => base.GetHashCode();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,48 @@ namespace OtherNamespace.Altogether;
partial class A {
partial class B {
partial class ChildBaseFullyQualified : Chickensoft.Introspection.IIntrospective {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new();

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(ChildBaseFullyQualified))).Metatype;

public class MetatypeMetadata : Chickensoft.Introspection.IMetatype {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Type Type => typeof(ChildBaseFullyQualified);
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool HasInitProperties { get; } = true;

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() {
[typeof(MetaAttribute)] = new System.Attribute[] {
new MetaAttribute()
}
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() {
};


[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) {
args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseFullyQualified requires init args.");
return new ChildBaseFullyQualified() {
Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default!
};
}
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override bool Equals(object obj) => true;
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override int GetHashCode() => base.GetHashCode();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ namespace BaseClasses.A;
using Chickensoft.Introspection;

partial class BaseClass : Chickensoft.Introspection.IIntrospective {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new();

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(BaseClass))).Metatype;

public class MetatypeMetadata : Chickensoft.Introspection.IMetatype {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Type Type => typeof(BaseClass);
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool HasInitProperties { get; } = true;

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() {
new Chickensoft.Introspection.PropertyMetadata(
Name: "Name",
Expand All @@ -32,26 +37,32 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype {
)
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() {
[typeof(MetaAttribute)] = new System.Attribute[] {
new MetaAttribute()
}
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() {
};


[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) {
args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing BaseClass requires init args.");
return new BaseClass() {
Name = args.ContainsKey("Name") ? (string)args["Name"] : default!
};
}
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override bool Equals(object obj) => true;
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override int GetHashCode() => base.GetHashCode();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,48 @@ namespace BaseClasses.B;
using Chickensoft.Introspection;

partial class Child : Chickensoft.Introspection.IIntrospective {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new();

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(Child))).Metatype;

public class MetatypeMetadata : Chickensoft.Introspection.IMetatype {
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Type Type => typeof(Child);
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool HasInitProperties { get; } = true;

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() {
[typeof(MetaAttribute)] = new System.Attribute[] {
new MetaAttribute()
}
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() {
};

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() {
};


[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) {
args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing Child requires init args.");
return new Child() {
Name = args.ContainsKey("Name") ? (string)args["Name"] : default!
};
}
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override bool Equals(object obj) => true;
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public override int GetHashCode() => base.GetHashCode();
}
}
Expand Down
Loading

0 comments on commit 281a55f

Please sign in to comment.