< Summary

Class:NanoCLang.Entities.BooleanConstant
Assembly:NanoCLang
File(s):C:\GitLab-Runner\builds\JxAESPd8\0\chenmichael\nanoc\src\NanoCLang\Entities\Expression\PureExpression\BooleanConstant.cs
Covered lines:1
Uncovered lines:1
Coverable lines:2
Total lines:14
Line coverage:50% (1 of 2)
Covered branches:2
Total branches:2
Branch coverage:100% (2 of 2)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%2100%
Clone()100%10%

File(s)

C:\GitLab-Runner\builds\JxAESPd8\0\chenmichael\nanoc\src\NanoCLang\Entities\Expression\PureExpression\BooleanConstant.cs

#LineLine coverage
 1namespace NanoCLang.Entities {
 2    /// <summary>
 3    /// Provides a class for boolean literal constants.
 4    /// </summary>
 5    public class BooleanConstant : IntegerConstant {
 6        /// <summary>
 7        /// Creates a new boolean constant with the given <paramref name="value"/>.
 8        /// </summary>
 9        /// <param name="value">Value of the literal.</param>
 1510        public BooleanConstant(bool value) : base(value ? 1 : 0, 1) { }
 11        /// <inheritdoc/>
 012        public override object Clone() => new BooleanConstant(Value != 0);
 13    }
 14}

Methods/Properties

.ctor(...)
Clone()