Problem with assertThrown

kookman thekookman at gmail.com
Tue Sep 10 00:40:07 UTC 2024


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 same exception. Am I missing something stupid 
>> here?
>
> At a glance, it looks like the part of case 5 which explicitly 
> catches the Exception and the part that uses assertThrown 
> should behave the same, but your example doesn't actually 
> compile (you didn't include a definition for base32Alphabet), 
> so it's not actually possible to reproduce your problem.
>
> - Jonathan M Davis

Thanks Jonathan. Sorry I missed the excerpt for base32Alphabet - 
included below:

```
enum base32Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
```



More information about the Digitalmars-d-learn mailing list