Skip to content

Commit 6a7011f

Browse files
committed
#80 Reading appropriate string value
1 parent ec6d80c commit 6a7011f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DbcParserLib.Tests/ParserTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ public void CheckGlobalPropertiesTest()
434434
Assert.That(dbName.CustomPropertyDefinition.StringCustomProperty, Is.Not.Null);
435435
Assert.That(dbName.CustomPropertyDefinition.StringCustomProperty.Default, Is.EqualTo(string.Empty));
436436
Assert.That(dbName.StringCustomProperty, Is.Not.Null);
437-
//Assert.That(dbName.StringCustomProperty.Value, Is.EqualTo("z_mx"));
437+
Assert.That(dbName.StringCustomProperty.Value, Is.EqualTo("z_mx"));
438438

439439
var busType = dbc.GlobalProperties.FirstOrDefault(x => x.CustomPropertyDefinition.Name.Equals("BusType"));
440440
Assert.That(busType, Is.Not.Null);

DbcParserLib/Parsers/PropertiesLineParser.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public bool TryParse(string line, IDbcBuilder builder, INextLineProvider nextLin
3939
builder.AddSignalCustomProperty(match.Groups[1].Value, uint.Parse(match.Groups[7].Value, CultureInfo.InvariantCulture), match.Groups[8].Value, stringValue, isNumeric);
4040
else
4141
{
42-
builder.AddGlobalCustomProperty(match.Groups[1].Value, match.Groups[9].Value, isNumeric);
42+
builder.AddGlobalCustomProperty(match.Groups[1].Value, stringValue, isNumeric);
4343
}
4444
}
4545
else

0 commit comments

Comments
 (0)