www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21707] New: std.base64: Faulty input creates range error

https://issues.dlang.org/show_bug.cgi?id=21707

          Issue ID: 21707
           Summary: std.base64: Faulty input creates range error instead
                    of Base64Exception
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: bugzilla bernis-buecher.de

This fails:

unittest
{
    import std.exception : assertThrown;

    char[][] t = [[ 'Z', 'g', '=' ]];
    assertThrown!Base64Exception(Base64.decoder(t));
}

--
Mar 13