import 'mocha' ; import * as assert from 'assert' ; import ErrorCorrectionLevel from './../../../../core/qrcode/decoder/ErrorCorrectionLevel' ; author Sean Owen
  describe ( "ErrorCorrectionLevelTestCase" , ( ) => { it ( "testForBits" , ( ) => { assert . strictEqual ( ErrorCorrectionLevel . M . equals ( ErrorCorrectionLevel . forBits ( 0 ) ) , true ) ; assert . strictEqual ( ErrorCorrectionLevel . L . equals ( ErrorCorrectionLevel . forBits ( 1 ) ) , true ) ; assert . strictEqual ( ErrorCorrectionLevel . H . equals ( ErrorCorrectionLevel . forBits ( 2 ) ) , true ) ; assert . strictEqual ( ErrorCorrectionLevel . Q . equals ( ErrorCorrectionLevel . forBits ( 3 ) ) , true ) ; try { ErrorCorrectionLevel . forBits ( 4 ) ; assert . ok ( false , "Should have thrown an exception" ) ; } catch ( iae ) { } } ) ; } ) ;