Skip to content

Commit

Permalink
CC Added
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumanth K B committed Oct 17, 2023
1 parent a9f8179 commit b935f4a
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/LCT.Common/Tommy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public static implicit operator TomlNode(TomlNode[] nodes)
#endregion
}

[ExcludeFromCodeCoverage]
public class TomlString : TomlNode
{
public override bool HasValue { get; } = true;
Expand Down Expand Up @@ -194,6 +195,7 @@ public override string ToInlineToml()
}
}

[ExcludeFromCodeCoverage]
public class TomlInteger : TomlNode
{
public enum Base
Expand All @@ -218,6 +220,7 @@ public override string ToInlineToml() =>
: Value.ToString(CultureInfo.InvariantCulture);
}

[ExcludeFromCodeCoverage]
public class TomlFloat : TomlNode, IFormattable
{
public override bool IsFloat { get; } = true;
Expand All @@ -241,6 +244,7 @@ var v when double.IsNegativeInfinity(v) => TomlSyntax.NEG_INF_VALUE,
};
}

[ExcludeFromCodeCoverage]
public class TomlBoolean : TomlNode
{
public override bool IsBoolean { get; } = true;
Expand All @@ -253,6 +257,7 @@ public class TomlBoolean : TomlNode
public override string ToInlineToml() => Value ? TomlSyntax.TRUE_VALUE : TomlSyntax.FALSE_VALUE;
}

[ExcludeFromCodeCoverage]
public class TomlDateTime : TomlNode, IFormattable
{
public int SecondsPrecision { get; set; }
Expand All @@ -266,6 +271,7 @@ public override string ToInlineToml() => ToInlineTomlInternal()
.Replace(TomlSyntax.ISO861ZeroZone, TomlSyntax.RFC3339ZeroZone);
}

[ExcludeFromCodeCoverage]
public class TomlDateTimeOffset : TomlDateTime
{
public override bool IsDateTimeOffset { get; } = true;
Expand All @@ -280,6 +286,7 @@ public override string ToString(string format, IFormatProvider formatProvider) =
protected override string ToInlineTomlInternal() => Value.ToString(TomlSyntax.RFC3339Formats[SecondsPrecision]);
}

[ExcludeFromCodeCoverage]
public class TomlDateTimeLocal : TomlDateTime
{
public enum DateTimeStyle
Expand Down Expand Up @@ -309,6 +316,7 @@ public override string ToInlineToml() =>
};
}

[ExcludeFromCodeCoverage]
public class TomlArray : TomlNode
{
private List<TomlNode> values;
Expand Down Expand Up @@ -420,6 +428,7 @@ public override void WriteTo(TextWriter tw, string name = null)
}
}

[ExcludeFromCodeCoverage]
public class TomlTable : TomlNode
{
private Dictionary<string, TomlNode> children;
Expand Down Expand Up @@ -561,6 +570,7 @@ internal void WriteTo(TextWriter tw, string name, bool writeSectionName)
}
}

[ExcludeFromCodeCoverage]
internal class TomlLazy : TomlNode
{
private readonly TomlNode parent;
Expand Down Expand Up @@ -621,7 +631,7 @@ public override TomlNode this[string key]
#endregion

#region Parser

[ExcludeFromCodeCoverage]
public class TOMLParser : IDisposable
{
public enum ParseState
Expand Down Expand Up @@ -1764,6 +1774,7 @@ private string ParseComment()

#endregion

[ExcludeFromCodeCoverage]
public static class TOML
{
public static bool ForceASCII { get; set; } = false;
Expand All @@ -1776,12 +1787,13 @@ public static TomlTable Parse(TextReader reader)
}

#region Exception Types

[ExcludeFromCodeCoverage]
public class TomlFormatException : Exception
{
public TomlFormatException(string message) : base(message) { }
}

[ExcludeFromCodeCoverage]
public class TomlParseException : Exception
{
public TomlParseException(TomlTable parsed, IEnumerable<TomlSyntaxException> exceptions) :
Expand All @@ -1796,6 +1808,7 @@ public TomlParseException(TomlTable parsed, IEnumerable<TomlSyntaxException> exc
public IEnumerable<TomlSyntaxException> SyntaxErrors { get; }
}

[ExcludeFromCodeCoverage]
public class TomlSyntaxException : Exception
{
public TomlSyntaxException(string message, TOMLParser.ParseState state, int line, int col) : base(message)
Expand All @@ -1816,6 +1829,7 @@ public TomlSyntaxException(string message, TOMLParser.ParseState state, int line

#region Parse utilities

[ExcludeFromCodeCoverage]
internal static class TomlSyntax
{
#region Type Patterns
Expand Down Expand Up @@ -1980,6 +1994,7 @@ public static bool IsValueSeparator(char c) =>
#endregion
}

[ExcludeFromCodeCoverage]
internal static class StringUtils
{
public static string AsKey(this string key)
Expand Down

0 comments on commit b935f4a

Please sign in to comment.