diff options
author | Marshall Lerner <malerner@microsoft.com> | 2022-02-16 20:06:52 +0300 |
---|---|---|
committer | Marshall Lerner <malerner@microsoft.com> | 2022-02-16 20:06:52 +0300 |
commit | 3dc4b4c323a3fd76a4ed47ae2be5c466a61f5ff5 (patch) | |
tree | d2bccbdd9196fb19cc461ec4806523cc4cf6cf1b | |
parent | 3160eeb4267f48768bbb87b153813ce4157ecfad (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.cs | 18 |
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); + } } } |