mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-01-22 16:16:17 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user