Skip to content

Commit

Permalink
#80 Reading appropriate string value
Browse files Browse the repository at this point in the history
  • Loading branch information
angalbiati committed Sep 2, 2024
1 parent ec6d80c commit 6a7011f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DbcParserLib.Tests/ParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public void CheckGlobalPropertiesTest()
Assert.That(dbName.CustomPropertyDefinition.StringCustomProperty, Is.Not.Null);
Assert.That(dbName.CustomPropertyDefinition.StringCustomProperty.Default, Is.EqualTo(string.Empty));
Assert.That(dbName.StringCustomProperty, Is.Not.Null);
//Assert.That(dbName.StringCustomProperty.Value, Is.EqualTo("z_mx"));
Assert.That(dbName.StringCustomProperty.Value, Is.EqualTo("z_mx"));

var busType = dbc.GlobalProperties.FirstOrDefault(x => x.CustomPropertyDefinition.Name.Equals("BusType"));
Assert.That(busType, Is.Not.Null);
Expand Down
2 changes: 1 addition & 1 deletion DbcParserLib/Parsers/PropertiesLineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public bool TryParse(string line, IDbcBuilder builder, INextLineProvider nextLin
builder.AddSignalCustomProperty(match.Groups[1].Value, uint.Parse(match.Groups[7].Value, CultureInfo.InvariantCulture), match.Groups[8].Value, stringValue, isNumeric);
else
{
builder.AddGlobalCustomProperty(match.Groups[1].Value, match.Groups[9].Value, isNumeric);
builder.AddGlobalCustomProperty(match.Groups[1].Value, stringValue, isNumeric);
}
}
else
Expand Down

0 comments on commit 6a7011f

Please sign in to comment.