This commit is contained in:
Ingy döt Net 2013-04-10 16:19:29 -07:00
parent e5e8880e41
commit 518da4a923
1019 changed files with 15877 additions and 0 deletions

View file

@ -0,0 +1,19 @@
import java.awt.Color;
import junit.framework.TestCase;
public class BasicBitmapStorageTest extends TestCase
{
public static final int WIDTH = 640, HEIGHT = 480;
BasicBitmapStorage bbs = new BasicBitmapStorage(WIDTH, HEIGHT);
public void testHappy()
{
bbs.fill(Color.cyan);
bbs.setPixel(WIDTH / 2, HEIGHT / 2, Color.BLACK);
Color c1 = bbs.getPixel(WIDTH / 2, HEIGHT / 2);
Color c2 = bbs.getPixel(20, 20);
assertEquals(Color.BLACK, c1);
assertEquals(Color.CYAN, c2);
}
}