use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class OutputStreamWriterTestCase method testFlushingLockedSymtabWithImports.
@Test
public void testFlushingLockedSymtabWithImports() throws Exception {
SymbolTable fred1 = Symtabs.register("fred", 1, catalog());
iw = makeWriter(fred1);
testFlushing();
}
use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class SharedSymbolTableTest method testMalformedSymbolEntry.
public void testMalformedSymbolEntry(String symbolValue) {
IonStruct s = sharedSymtabStruct(system(), "ST", 5);
IonValue entry = system().singleValue(symbolValue);
s.put(SystemSymbols.SYMBOLS).newList(entry);
SymbolTable st = myMaker.newSharedSymtab(system(), s);
checkSharedTable("ST", 5, new String[] { null }, st);
assertEquals(1, st.getMaxId());
checkUnknownSymbol(1, st);
}
use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class SharedSymbolTableTest method testMalformedSymbols.
public void testMalformedSymbols(String symbolValue) {
IonStruct s = sharedSymtabStruct(system(), "ST", 5);
putParsedValue(s, SystemSymbols.SYMBOLS, symbolValue);
SymbolTable st = myMaker.newSharedSymtab(system(), s);
checkSharedTable("ST", 5, EMPTY_STRING_ARRAY, st);
}
use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class SharedSymbolTableTest method testBasicSharedSymtabCreation.
// -------------------------------------------------------------------------
@Test
public void testBasicSharedSymtabCreation() {
String[] syms = { "a", "b", "c" };
SymbolTable st = myMaker.newSharedSymtab(system(), "ST", 1, syms);
checkSharedTable("ST", 1, syms, st);
}
use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class SharedSymbolTableTest method testInternNull.
@Test(expected = NullPointerException.class)
public void testInternNull() {
SymbolTable st = makeAbcTable();
st.intern(null);
}
Aggregations