Correct TestEvent parsing to correctly recognise parse validity. Fuse test runner now runs!

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2019-07-20 20:20:25 +01:00
parent a9a03d946a
commit fc33219f62

View File

@@ -5,9 +5,11 @@
public class TestEvent
{
private int cycles;
public bool Valid { get; private set; } = false;
public int Cycles { get; private set; } = -1;
public int Cycles => this.cycles;
public string Specifier { get; private set; }
@@ -32,7 +34,12 @@
private void ParseLine(string[] tokens)
{
this.Cycles = int.Parse(tokens[0]);
this.Valid = int.TryParse(tokens[0], out this.cycles);
if (!this.Valid)
{
return;
}
this.Specifier = tokens[1];
this.Valid = true;