@@ -0,0 +1,1794 @@
+package com.redhat.ceylon.compiler.loader;%0A%0Aimport java.util.HashMap;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport com.redhat.ceylon.compiler.typechecker.model.Annotation;%0Aimport com.redhat.ceylon.compiler.typechecker.model.Value;%0A%0Apublic class TestBitAnnotations %7B%0A%0A    @Test%0A    public void testEncode() %7B%0A        final Value v = new Value();%0A        final HashMap%3CString,Object%3E m = new HashMap%3C%3E();%0A        MetamodelGenerator.encodeAnnotations(v, m);%0A        Assert.assertNull(m.get(MetamodelGenerator.KEY_PACKED_ANNS));%0A        v.getAnnotations().add(new Annotation(%22shared%22));%0A        MetamodelGenerator.encodeAnnotations(v, m);%0A        Assert.assertEquals(1, m.get(MetamodelGenerator.KEY_PACKED_ANNS));%0A        v.getAnnotations().add(new Annotation(%22actual%22));%0A        MetamodelGenerator.encodeAnnotations(v, m);%0A        Assert.assertEquals(3, m.get(MetamodelGenerator.KEY_PACKED_ANNS));%0A        v.getAnnotations().add(new Annotation(%22default%22));%0A        MetamodelGenerator.encodeAnnotations(v, m);%0A        Assert.assertEquals(11, m.get(MetamodelGenerator.KEY_PACKED_ANNS));%0A    %7D%0A%0A    @Test%0A    public void testBits() %7B%0A        Assert.assertTrue(JsonPackage.hasAnnotationBit(11, %22shared%22));%0A        Assert.assertTrue(JsonPackage.hasAnnotationBit(11, %22actual%22));%0A        Assert.assertTrue(JsonPackage.hasAnnotationBit(11, %22default%22));%0A        Assert.assertFalse(JsonPackage.hasAnnotationBit(11, %22late%22));%0A        Assert.assertFalse(JsonPackage.hasAnnotationBit(11, %22formal%22));%0A        Assert.assertFalse(JsonPackage.hasAnnotationBit(11, %22abstract%22));%0A        Assert.assertFalse(JsonPackage.hasAnnotationBit(11, %22final%22));%0A        Assert.assertFalse(JsonPackage.hasAnnotationBit(11, %22native%22));%0A        Assert.assertFalse(JsonPackage.hasAnnotationBit(11, %22sealed%22));%0A    %7D%0A%0A%7D%0A

test the bitset encoding