Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/debugger-libs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lerner <malerner@microsoft.com>2022-02-16 20:06:52 +0300
committerMarshall Lerner <malerner@microsoft.com>2022-02-16 20:06:52 +0300
commit3dc4b4c323a3fd76a4ed47ae2be5c466a61f5ff5 (patch)
treed2bccbdd9196fb19cc461ec4806523cc4cf6cf1b
parent3160eeb4267f48768bbb87b153813ce4157ecfad (diff)
Adding tests to make sure adding breakpoints with null or empty filenames doesn't fail
-rw-r--r--UnitTests/Mono.Debugging.Tests/Shared/BreakpointsAndSteppingTests.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/UnitTests/Mono.Debugging.Tests/Shared/BreakpointsAndSteppingTests.cs b/UnitTests/Mono.Debugging.Tests/Shared/BreakpointsAndSteppingTests.cs
index ced8211..5f61924 100644
--- a/UnitTests/Mono.Debugging.Tests/Shared/BreakpointsAndSteppingTests.cs
+++ b/UnitTests/Mono.Debugging.Tests/Shared/BreakpointsAndSteppingTests.cs
@@ -1317,5 +1317,23 @@ namespace Mono.Debugging.Tests
Assert.AreEqual (1, bps.Count);
Assert.AreEqual (Path.Combine(Environment.CurrentDirectory, "fileName2.cs"), bps [0].FileName);
}
+
+ [Test]
+ public void NullFileName ()
+ {
+ var store = new BreakpointStore ();
+ store.Add (new Breakpoint (null, 10));
+ var bps = store.GetBreakpoints ();
+ Assert.AreEqual (1, bps.Count);
+ }
+
+ [Test]
+ public void EmptyFileName ()
+ {
+ var store = new BreakpointStore ();
+ store.Add (new Breakpoint ("", 10));
+ var bps = store.GetBreakpoints ();
+ Assert.AreEqual (1, bps.Count);
+ }
}
}