@Override public Unit matchIntegerUnsignedNormalized( final TIntegerUnsignedNormalized t) { return this.onIntegerNormalized(t.getSizeInBits().getValue()); }
@Override public Unit matchIntegerUnsignedNormalized( final TIntegerUnsignedNormalized t) { return this.onIntegerNormalized(t.getSizeInBits().getValue(), false); }
@Override public Unit matchIntegerUnsignedNormalized( final TIntegerUnsignedNormalized t) { return this.onIntegerNormalized(t.getSizeInBits().getValue()); }
@Override public Unit matchIntegerUnsignedNormalized( final TIntegerUnsignedNormalized t) { final BigInteger size = t.getSizeInBits().getValue(); this.onIntegerNormalized(size, false); return Unit.unit(); } }
@Test public final void testTypeExprIntegerUnsignedNormalizedSizeCorrect() throws Exception { final JPRAParserType p = this.newParser(); final GlobalContextType c = GlobalContexts.newContext(new AlwaysEmptyLoader()); final JPRAResolverType r = this.newResolver(c); final JPRACheckerType ch = this.newChecker( c, JPRACheckerStandardCapabilities.newCapabilities()); final TypeExprType<IdentifierType, Untyped> te = r.resolveTypeExpression( p.parseTypeExpression( this.newStringSExpr("(integer unsigned-normalized 32)"))); final TypeExprIntegerUnsignedNormalized<IdentifierType, TType> e = TypeExprIntegerUnsignedNormalized.class.cast(ch.checkTypeExpression(te)); final TIntegerUnsignedNormalized ti = TIntegerUnsignedNormalized.class.cast(e.getType()); Assert.assertEquals(BigInteger.valueOf(32L), ti.getSizeInBits().getValue()); }