aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Emulations
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-03-10 03:59:31 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-03-10 03:59:31 +0200
commitd1d28d68564d0a76021944ba1e2993ffb3eaba61 (patch)
treec0068878c600b48edccca9e824d6b9c41674cbee /Software/Visual_Studio/Tango.Emulations
parentdff40538d054551a74034b473f9f0e0c3590bcd0 (diff)
downloadTango-d1d28d68564d0a76021944ba1e2993ffb3eaba61.tar.gz
Tango-d1d28d68564d0a76021944ba1e2993ffb3eaba61.zip
Bit completed except updated BIT types.
Diffstat (limited to 'Software/Visual_Studio/Tango.Emulations')
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 1c64933b2..1f8c34358 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -1803,12 +1803,27 @@ namespace Tango.Emulations.Emulators
{
BitResult result = new BitResult();
result.BitType = bitType;
- result.Passed = _rnd.Next(0, 100) > 50;
- if (!result.Passed)
+ var rnd = _rnd.Next(0, 100);
+
+ if (rnd < 25)
+ {
+ result.Status = BitResultStatus.Pending;
+ }
+ else if (rnd >= 25 && rnd < 50)
{
+ result.Status = BitResultStatus.Passed;
+ }
+ else if (rnd >= 50 && rnd < 75)
+ {
+ result.Status = BitResultStatus.Failed;
result.Description = "Emulator error message";
}
+ else if (rnd >= 75)
+ {
+ result.Status = BitResultStatus.Warning;
+ result.Description = "Emulator warning message";
+ }
response.Results.Add(result);
}