Lines Matching defs:to
16 * 2 along with this work; if not, write to the Free Software Foundation,
55 * Writes two bytes to 'out' and reads one byte from 'in' so
56 * as to make 'in' readable.
71 ("Expected to read 0 or 1 byte; actual number was " + n);
85 * Changes the given key's interest set from one set to another and then
88 static void testChange(SelectionKey key, int from, int to) throws IOException {
97 // change to the "to" interest set
98 key.interestOps(to);
103 int expected = (to == 0) ? 0 : 1;
116 if ((to & OP_READ) == 0) {
117 assertTrue(!readable, "Not expected to be readable");
119 assertTrue(readable, "Expected to be readable");
122 if ((to & OP_WRITE) == 0) {
123 assertTrue(!writable, "Not expected to be writable");
125 assertTrue(writable, "Expected to be writable");
172 for (int to: OPS) {
174 System.out.println(toOpsString(from) + " -> " + toOpsString(to));
176 testChange(key, from, to);
179 if (to == 0)
184 if (to == OP_READ) {