JAL-3130 adapted getdown src. attempt 2. first attempt failed due to cp'ed .git files
[jalview.git] / getdown / src / getdown / core / src / test / java / com / threerings / getdown / util / ColorTest.java
1 //
2 // Getdown - application installer, patcher and launcher
3 // Copyright (C) 2004-2018 Getdown authors
4 // https://github.com/threerings/getdown/blob/master/LICENSE
5
6 package com.threerings.getdown.util;
7
8 import org.junit.Test;
9 import static org.junit.Assert.assertEquals;
10
11 /**
12  * Tests {@link Color}.
13  */
14 public class ColorTest
15 {
16     @Test
17     public void testBrightness() {
18         assertEquals(0, Color.brightness(0xFF000000), 0.0000001);
19         assertEquals(1, Color.brightness(0xFFFFFFFF), 0.0000001);
20         assertEquals(0.0117647, Color.brightness(0xFF010203), 0.0000001);
21         assertEquals(1, Color.brightness(0xFF00FFC8), 0.0000001);
22     }
23 }