FC18: Made melt down fault equal to melt up of choco number taste
This commit is contained in:
parent
37992ce50a
commit
7559789824
2 changed files with 25 additions and 5 deletions
|
|
@ -118,7 +118,7 @@ public enum FCFlameNumberTaste {
|
||||||
return FLAG_NAN;
|
return FLAG_NAN;
|
||||||
}
|
}
|
||||||
if (ordinal() <= NUMBER_NEGATIVE.ordinal()) {
|
if (ordinal() <= NUMBER_NEGATIVE.ordinal()) {
|
||||||
return this;
|
return FLAG_NAN;
|
||||||
}
|
}
|
||||||
return valueOf(ordinal() - CHOCO_HEAT_CYCLE_STEP);
|
return valueOf(ordinal() - CHOCO_HEAT_CYCLE_STEP);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,8 @@ public class FCFlameNumberTasteTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMeltCycle() throws Exception {
|
public void testMeltCycleUp() throws Exception {
|
||||||
FCFlameNumberTaste taste = FCFlameNumberTaste.NUMBER_POSITIVE;
|
FCFlameNumberTaste tasteNew = FCFlameNumberTaste.NUMBER_POSITIVE;
|
||||||
FCFlameNumberTaste tasteNew = taste.chocoRemeltDown();
|
|
||||||
Assertions.assertEquals(taste, tasteNew);
|
|
||||||
tasteNew = tasteNew.chocoRemeltUp();
|
tasteNew = tasteNew.chocoRemeltUp();
|
||||||
Assertions.assertEquals(FCFlameNumberTaste.NUMBER_POSITIVE_CARRY, tasteNew);
|
Assertions.assertEquals(FCFlameNumberTaste.NUMBER_POSITIVE_CARRY, tasteNew);
|
||||||
tasteNew = tasteNew.chocoRemeltUp();
|
tasteNew = tasteNew.chocoRemeltUp();
|
||||||
|
|
@ -65,4 +63,26 @@ public class FCFlameNumberTasteTest {
|
||||||
Assertions.assertEquals(FCFlameNumberTaste.FLAG_NAN, tasteNew);
|
Assertions.assertEquals(FCFlameNumberTaste.FLAG_NAN, tasteNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testMeltCycleDown() throws Exception {
|
||||||
|
FCFlameNumberTaste tasteNew = FCFlameNumberTaste.FLAG_NAN;
|
||||||
|
tasteNew = tasteNew.chocoRemeltDown();
|
||||||
|
Assertions.assertEquals(FCFlameNumberTaste.FLAG_NAN, tasteNew);
|
||||||
|
tasteNew = tasteNew.chocoRemeltDown();
|
||||||
|
Assertions.assertEquals(FCFlameNumberTaste.FLAG_NAN, tasteNew);
|
||||||
|
|
||||||
|
tasteNew = FCFlameNumberTaste.FLAG_INEXACT.chocoRemeltDown();
|
||||||
|
Assertions.assertEquals(FCFlameNumberTaste.FLAG_NAN, tasteNew);
|
||||||
|
|
||||||
|
tasteNew = FCFlameNumberTaste.INFINITY_NEGATIVE_CARRY.chocoRemeltDown();
|
||||||
|
Assertions.assertEquals(FCFlameNumberTaste.INFINITY_NEGATIVE, tasteNew);
|
||||||
|
tasteNew = tasteNew.chocoRemeltDown();
|
||||||
|
Assertions.assertEquals(FCFlameNumberTaste.NUMBER_NEGATIVE_CARRY, tasteNew);
|
||||||
|
tasteNew = tasteNew.chocoRemeltDown();
|
||||||
|
Assertions.assertEquals(FCFlameNumberTaste.NUMBER_NEGATIVE, tasteNew);
|
||||||
|
tasteNew = tasteNew.chocoRemeltDown();
|
||||||
|
Assertions.assertEquals(FCFlameNumberTaste.FLAG_NAN, tasteNew);
|
||||||
|
tasteNew = tasteNew.chocoRemeltDown();
|
||||||
|
Assertions.assertEquals(FCFlameNumberTaste.FLAG_NAN, tasteNew);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue