Search in sources :

Example 31 with Bytes

use of suite.primitive.Bytes in project suite by stupidsing.

the class ImperativeCompilerTest method testLet.

@Test
public void testLet() {
    Bytes bytes = imperativeCompiler.compile(0, "{null/*} = 1 shl 3;");
    assertNotNull(bytes);
    System.out.println(bytes);
}
Also used : Bytes(suite.primitive.Bytes) Test(org.junit.Test)

Example 32 with Bytes

use of suite.primitive.Bytes in project suite by stupidsing.

the class ImperativeCompilerTest method testArray.

@Test
public void testArray() {
    Bytes bytes = imperativeCompiler.compile(0, "declare (int * 2) array = array (1, 2,); {array/:3} = array/:4;");
    assertNotNull(bytes);
    System.out.println(bytes);
}
Also used : Bytes(suite.primitive.Bytes) Test(org.junit.Test)

Example 33 with Bytes

use of suite.primitive.Bytes in project suite by stupidsing.

the class ImperativeCompilerTest method testBind.

@Test
public void testBind() {
    Bytes bytes = imperativeCompiler.compile(0, "if-bind (1 := $a) then a else 0");
    assertNotNull(bytes);
    System.out.println(bytes);
}
Also used : Bytes(suite.primitive.Bytes) Test(org.junit.Test)

Example 34 with Bytes

use of suite.primitive.Bytes in project suite by stupidsing.

the class ImperativeCompilerTest method testDataStructureType.

@Test
public void testDataStructureType() {
    String s = // 
    "" + // 
    "declare object = new (prev = 0, next = 1,);" + "object/next";
    Bytes bytes = imperativeCompiler.compile(0, s);
    assertNotNull(bytes);
    System.out.println(bytes);
}
Also used : Bytes(suite.primitive.Bytes) Test(org.junit.Test)

Example 35 with Bytes

use of suite.primitive.Bytes in project suite by stupidsing.

the class ImperativeCompilerTest method testField.

@Test
public void testField() {
    Bytes bytes = imperativeCompiler.compile(0, "signature x = struct ( | int i | int j); x/j = 3;");
    assertNotNull(bytes);
    System.out.println(bytes);
}
Also used : Bytes(suite.primitive.Bytes) Test(org.junit.Test)

Aggregations

Bytes (suite.primitive.Bytes)56 Test (org.junit.Test)18 BytesBuilder (suite.primitive.Bytes.BytesBuilder)8 IOException (java.io.IOException)5 InputStream (java.io.InputStream)4 ArrayList (java.util.ArrayList)4 List (java.util.List)4 Pair (suite.adt.pair.Pair)4 OutputStream (java.io.OutputStream)3 Path (java.nio.file.Path)3 To (suite.util.To)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 Assert.assertEquals (org.junit.Assert.assertEquals)2 Constants (suite.Constants)2 Amd64Interpret (suite.assembler.Amd64Interpret)2 Condition (suite.concurrent.Condition)2 Extent (suite.file.ExtentAllocator.Extent)2 JournalledPageFile (suite.file.JournalledPageFile)2 ImperativeCompiler (suite.ip.ImperativeCompiler)2 DataInput_ (suite.util.DataInput_)2