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:
Chris Vest 2020-10-06 16:37:20 +02:00
parent 4147d7d51d
commit cfb45597f0
8 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

@ -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 {

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();