If I'm not mistaken I think you can use:

```D
assertThrown!SwitchError(20.predSwitch!"a < b"(
  	1, "less than 1",
  	5, "less than 5",
  	10, "less than 10"));
```