function assertDecodings(inputs, expectedOutput) {
  const textOutput =
      typeof expectedOutput === 'string' ? expectedOutput : expectedOutput.text;
  const binaryOutput = typeof expectedOutput === 'string' ?
      expectedOutput :
      expectedOutput.binary;
  const arrOutput = crypt.stringToByteArray(binaryOutput);
  const uint8ArrOutput = SUPPORT_TYPED_ARRAY ? new Uint8Array(arrOutput) : null;

  // Quick validity check that decoding the text version is equivalent.
  assertArrayEquals(arrOutput, crypt.stringToUtf8ByteArray(textOutput));

  for (let i = 0; i < inputs.length; i++) {
    const input = inputs[i];

    // decodeString
    assertEquals(textOutput, base64.decodeStringUtf8(input, true));
    assertEquals(binaryOutput, base64.decodeString(input, true));
    assertEquals(textOutput, base64.decodeToText(input, true));
    assertEquals(binaryOutput, base64.decodeToBinaryString(input, true));

    if (i === 0) {
      // For Alphabet.DEFAULT, test with native decoder too
      assertEquals(textOutput, base64.decodeStringUtf8(input));
      assertEquals(binaryOutput, base64.decodeString(input));
      assertEquals(textOutput, base64.decodeToText(input));
      assertEquals(binaryOutput, base64.decodeToBinaryString(input));
    }

    // decodeStringToByteArray
    assertArrayEquals(base64.decodeStringToByteArray(input), arrOutput);
    // Check that obsolete websafe param has no effect.
    assertArrayEquals(base64.decodeStringToByteArray(input, true), arrOutput);

    // decodeStringToUint8Array
    if (SUPPORT_TYPED_ARRAY) {
      assertObjectEquals(
          base64.decodeStringToUint8Array(input), uint8ArrOutput);
    }
  }
}
Assert decodings
@param {!Array<string>} inputs input strings in various encodings.
@param {string|{text: string, binary: string}} expectedOutput expected output
    in string (optionally split out for text/binary).