Re: Problem with assertThrown

2024-09-09 Thread kookman via Digitalmars-d-learn
On Tuesday, 10 September 2024 at 01:04:15 UTC, Jonathan M Davis wrote: When I run it locally, assertThrown passes as expected for test case 5, and the same happens on run.dlang.io, so nothing in my specific setup is making it pass when it normally wouldn't. So, unless you verified that your

Re: Problem with assertThrown

2024-09-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, September 9, 2024 6:40:07 PM MDT kookman via Digitalmars-d-learn wrote: > On Tuesday, 10 September 2024 at 00:27:43 UTC, Jonathan M Davis > > wrote: > > On Monday, September 9, 2024 5:46:18 PM MDT kookman via > > > > Digitalmars-d-learn wrote: > >> It seems like assertThrown works as ex

Re: Problem with assertThrown

2024-09-09 Thread kookman via Digitalmars-d-learn
On Tuesday, 10 September 2024 at 00:27:43 UTC, Jonathan M Davis wrote: On Monday, September 9, 2024 5:46:18 PM MDT kookman via Digitalmars-d-learn wrote: It seems like assertThrown works as expected for case 4, but mysteriously not working for case 5 - despite the code under test raising the sa

Re: Problem with assertThrown

2024-09-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, September 9, 2024 5:46:18 PM MDT kookman via Digitalmars-d-learn wrote: > It seems like assertThrown works as expected for case 4, but > mysteriously not working for case 5 - despite the code under test > raising the same exception. Am I missing something stupid here? At a glance, it l

Problem with assertThrown

2024-09-09 Thread kookman via Digitalmars-d-learn
I'm having trouble understanding why the assertThrown in unit test 5 is not behaving in the code below: ``` ubyte[] decodeBase32(string encoded) { import std.string: indexOf, stripRight; // Remove padding if present encoded = encoded.stripRight("="); ubyte[] result; size_t