Search in sources :

Example 1 with CharSequenceHashSet

use of com.questdb.std.CharSequenceHashSet in project questdb by bluestreak01.

the class DateFormatCompilerTest method testOperationUniqueness.

@Test
public void testOperationUniqueness() {
    Assert.assertTrue(DateFormatCompiler.opList.size() > 0);
    IntHashSet codeSet = new IntHashSet();
    CharSequenceHashSet nameSet = new CharSequenceHashSet();
    for (int i = 0, n = DateFormatCompiler.opList.size(); i < n; i++) {
        String name = DateFormatCompiler.opList.getQuick(i);
        int code = DateFormatCompiler.opMap.get(name);
        Assert.assertTrue(codeSet.add(code));
        Assert.assertTrue(nameSet.add(name));
    }
}
Also used : CharSequenceHashSet(com.questdb.std.CharSequenceHashSet) IntHashSet(com.questdb.std.IntHashSet) Test(org.junit.Test)

Example 2 with CharSequenceHashSet

use of com.questdb.std.CharSequenceHashSet in project questdb by bluestreak01.

the class DateFormatCompilerTest method testOperationUniqueness.

@Test
public void testOperationUniqueness() {
    Assert.assertTrue(DateFormatCompiler.opList.size() > 0);
    IntHashSet codeSet = new IntHashSet();
    CharSequenceHashSet nameSet = new CharSequenceHashSet();
    for (int i = 0, n = DateFormatCompiler.opList.size(); i < n; i++) {
        String name = DateFormatCompiler.opList.getQuick(i);
        int code = DateFormatCompiler.opMap.get(name);
        Assert.assertTrue(codeSet.add(code));
        Assert.assertTrue(nameSet.add(name));
    }
}
Also used : CharSequenceHashSet(com.questdb.std.CharSequenceHashSet) IntHashSet(com.questdb.std.IntHashSet) Test(org.junit.Test)

Aggregations

CharSequenceHashSet (com.questdb.std.CharSequenceHashSet)2 IntHashSet (com.questdb.std.IntHashSet)2 Test (org.junit.Test)2