package com.google.zxing.qrcode.decoder;
-import com.google.zxing.ReaderException;
import junit.framework.TestCase;
/**
*/
public final class ErrorCorrectionLevelTestCase extends TestCase {
- public void testForBits() throws ReaderException {
+ public void testForBits() {
assertEquals(ErrorCorrectionLevel.M, ErrorCorrectionLevel.forBits(0));
assertEquals(ErrorCorrectionLevel.L, ErrorCorrectionLevel.forBits(1));
assertEquals(ErrorCorrectionLevel.H, ErrorCorrectionLevel.forBits(2));
try {
ErrorCorrectionLevel.forBits(4);
fail("Should have thrown an exception");
- } catch (ReaderException re) {
+ } catch (IllegalArgumentException iae) {
// good
}
}