Skip to content

Commit

Permalink
Pass operations test
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Apr 12, 2024
1 parent 296b575 commit 70c115d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BymlLibrary/Yaml/BymlYamlReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private static Byml ParseScalar(ref YamlParser parser)
{
if (parser.IsNullScalar()) {
// Check for empty strings
if (parser.TryReadScalarAsString(out _)) {
if (parser.TryReadScalarAsString(out string? empty) && empty == string.Empty) {
return string.Empty;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Tests/BymlLibrary.Tests/BymlOperationsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ namespace BymlLibrary.Tests;
public class BymlOperationsTests
{
const string YAML = """
Array: [!f64 NaN, Array_Value]
Array: [!d NaN, Array_Value]
Binary: !!binary QmluYXJ5IFZhbHVl
BinaryAligned: !!file { Alignment: 16, Data: !!binary QmluYXJ5IFZhbHVlIEFsaQ== }
Bool: true
Double: !d 3.141592653589793
Float: 3.1415927
HashMap32: !h32 { 0: 1073741823, 2147483647: HashMap32_Value }
HashMap64: !h64 { 0: !s64 4611686018427387903, 9223372036854775807: HashMap64_Value }
HashMap64: !h64 { 0: !l 4611686018427387903, 9223372036854775807: HashMap64_Value }
Int: 2147483647
Int64: !l 9223372036854775807
Map: { MapKey_A: 3.1415927, MapKey_B: Map_Value }
Expand Down

0 comments on commit 70c115d

Please sign in to comment.