Rename BBufTest to BufTest
Motivation: The BBufTest was implemented entirely in terms of the Buf interface. There is no reason for it to reference any particular implementation. Modification: BBufTest and friends are renamed to just BufTest. Result: Tests are now named after the API surface they test.
This commit is contained in:
parent
4147d7d51d
commit
cfb45597f0
@ -30,7 +30,7 @@ import java.util.concurrent.SynchronousQueue;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public abstract class BBufTest {
|
||||
public abstract class BufTest {
|
||||
protected abstract Allocator createAllocator();
|
||||
|
||||
private Allocator allocator;
|
@ -571,7 +571,7 @@ public final class Codegen {
|
||||
public static void main(String[] args) throws Exception {
|
||||
generateCodeInline(Path.of("buffer/src/main/java/io/netty/buffer/b2/Buf.java"));
|
||||
generateCodeInline(Path.of("buffer/src/main/java/io/netty/buffer/b2/BBuf.java"));
|
||||
generateCodeInline(Path.of("buffer/src/test/java/io/netty/buffer/b2/BBufTest.java"));
|
||||
generateCodeInline(Path.of("buffer/src/test/java/io/netty/buffer/b2/BufTest.java"));
|
||||
}
|
||||
|
||||
private static void generateCodeInline(Path path) throws IOException {
|
||||
|
@ -19,7 +19,7 @@ import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class DirectBBufTest extends BBufTest {
|
||||
public class DirectBufTest extends BufTest {
|
||||
@Override
|
||||
protected Allocator createAllocator() {
|
||||
return Allocator.direct();
|
@ -5,7 +5,7 @@ import org.junit.Test;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class DirectBBufWithCleanerTest extends DirectBBufTest {
|
||||
public class DirectBufWithCleanerTest extends DirectBufTest {
|
||||
@Override
|
||||
protected Allocator createAllocator() {
|
||||
return Allocator.directWithCleaner();
|
@ -19,7 +19,7 @@ import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class HeapBBufTest extends BBufTest {
|
||||
public class HeapBufTest extends BufTest {
|
||||
@Override
|
||||
protected Allocator createAllocator() {
|
||||
return Allocator.heap();
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
public class PooledDirectBBufTest extends DirectBBufTest {
|
||||
public class PooledDirectBufTest extends DirectBufTest {
|
||||
@Override
|
||||
protected Allocator createAllocator() {
|
||||
return Allocator.pooledDirect();
|
@ -20,7 +20,7 @@ import org.junit.Test;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class PooledDirectBBufWithCleanerTest extends DirectBBufWithCleanerTest {
|
||||
public class PooledDirectBufWithCleanerTest extends DirectBufWithCleanerTest {
|
||||
@Override
|
||||
protected Allocator createAllocator() {
|
||||
return Allocator.pooledDirectWithCleaner();
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
public class PooledHeapBBufTest extends HeapBBufTest {
|
||||
public class PooledHeapBufTest extends HeapBufTest {
|
||||
@Override
|
||||
protected Allocator createAllocator() {
|
||||
return Allocator.pooledHeap();
|
Loading…
Reference in New Issue
Block a user