OSDN Git Service

tc
authormozipi <mozipi_2@yahoo.co.jp>
Fri, 12 Apr 2013 12:48:06 +0000 (21:48 +0900)
committermozipi <mozipi_2@yahoo.co.jp>
Fri, 12 Apr 2013 12:48:06 +0000 (21:48 +0900)
common/pcc/chemicraft/testcase/FormulaTest.java
仕様書/化学Dimアイデア.odt [new file with mode: 0644]

index 4b116f6..6e5da59 100644 (file)
@@ -1,8 +1,9 @@
-/*
 package pcc.chemicraft.testcase;
 
 import static org.junit.Assert.*;
 
+import java.util.Arrays;
+
 import org.junit.Test;
 
 import pcc.chemicraft.util.Formula;
@@ -15,16 +16,15 @@ public class FormulaTest extends Formula {
 
        @Test
        public void test() {
-               Formula formula = new Formula("C64Si65535");
+               Formula formula = new Formula("Si10C19O211Si128C12O11Ca198");
                assertEquals("変換がおかしいです(元素)",
                                formula.getAtoms(),
-                               new String[] {"C", "Si"});
+                               new String[] {"Si", "C", "O", "Ca"});
 
                assertEquals("変換がおかしいです(元素数)",
                                formula.getAmonts(),
-                               new Integer[] {64, 65535});
+                               new Integer[] {10+128, 19+12, 211+11, 198});
 
        }
 
 }
-*/
\ No newline at end of file
diff --git a/仕様書/化学Dimアイデア.odt b/仕様書/化学Dimアイデア.odt
new file mode 100644 (file)
index 0000000..432080b
Binary files /dev/null and b/仕様書/化学Dimアイデア.odt differ