Skip to content
Snippets Groups Projects
Commit 445ad987 authored by Boyun Deng's avatar Boyun Deng
Browse files

fixed errors in Gantt

parent de17fbb7
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?><project name="PCM" company="McMaster, CAS Department" webLink="" view-date="2015-11-03" view-index="0" gantt-divider-location="302" resource-divider-location="300" version="2.7.1" locale="en_US">
<?xml version="1.0" encoding="UTF-8"?><project name="PCM" company="McMaster, CAS Department" webLink="" view-date="2015-11-01" view-index="0" gantt-divider-location="302" resource-divider-location="300" version="2.7.1" locale="en_US">
<description><![CDATA[Simulation of temperature over time for a solar water heating tank incorporating phase change material (PCM).]]></description>
<view zooming-state="default:0" id="gantt-chart">
<view zooming-state="default:2" id="gantt-chart">
<field id="tpd3" name="Name" width="56" order="0"/>
<field id="tpd4" name="Begin date" width="22" order="1"/>
<field id="tpd5" name="End date" width="21" order="2"/>
</view>
<view id="resource-table">
<field id="0" name="Name" width="50" order="0"/>
<field id="1" name="Default role" width="50" order="1"/>
<field id="1" name="Default role" width="49" order="1"/>
</view>
<!-- -->
<calendars>
......@@ -43,30 +43,33 @@
<task id="32" name="Schedule" color="#8cb6ce" meeting="false" start="2015-11-03" duration="4" complete="0" expand="true"/>
</task>
<task id="2" name="Design Doc Due" color="#8cb6ce" meeting="true" start="2015-11-06" duration="0" complete="0" expand="true"/>
<task id="44" name="Implementation" color="#8cb6ce" meeting="false" start="2015-11-07" duration="5" complete="0" expand="true">
<task id="44" name="Implementation" color="#8cb6ce" meeting="false" start="2015-11-07" duration="20" complete="0" expand="true">
<depend id="21" type="2" difference="0" hardness="Strong"/>
<task id="20" name="Input Hiding Module" color="#8cb6ce" meeting="false" start="2015-11-07" duration="5" complete="0" expand="true">
<task id="20" name="Nonogram Module" color="#8cb6ce" meeting="false" start="2015-11-07" duration="5" complete="0" expand="true">
<depend id="49" type="2" difference="0" hardness="Strong"/>
<depend id="62" type="2" difference="0" hardness="Strong"/>
</task>
<task id="49" name="Input Parameter Module" color="#8cb6ce" meeting="false" start="2015-11-07" duration="5" complete="0" expand="true">
<task id="49" name="Nonogram Hint Module" color="#8cb6ce" meeting="false" start="2015-11-12" duration="5" complete="0" expand="true">
<depend id="51" type="2" difference="0" hardness="Strong"/>
<depend id="63" type="2" difference="0" hardness="Strong"/>
</task>
<task id="51" name="Output Format Module" color="#8cb6ce" meeting="false" start="2015-11-07" duration="5" complete="0" expand="true">
<task id="51" name="Nonogram GUI Module" color="#8cb6ce" meeting="false" start="2015-11-17" duration="5" complete="0" expand="true">
<depend id="57" type="2" difference="0" hardness="Strong"/>
<depend id="64" type="2" difference="0" hardness="Strong"/>
</task>
<task id="57" name="Control Module" color="#8cb6ce" meeting="false" start="2015-11-07" duration="5" complete="0" expand="true"/>
<task id="57" name="Game Logic Module" color="#8cb6ce" meeting="false" start="2015-11-22" duration="5" complete="0" expand="true"/>
</task>
<task id="61" name="Unit Testing" color="#8cb6ce" meeting="false" start="2015-11-12" duration="4" complete="0" expand="true">
<task id="61" name="Unit Testing" color="#8cb6ce" meeting="false" start="2015-11-12" duration="14" complete="0" expand="true">
<depend id="21" type="2" difference="0" hardness="Strong"/>
<depend id="68" type="2" difference="0" hardness="Strong"/>
<task id="62" name="Input Hiding Module" color="#8cb6ce" meeting="false" start="2015-11-12" duration="4" complete="0" expand="true"/>
<task id="63" name="Input Parameter Module" color="#8cb6ce" meeting="false" start="2015-11-12" duration="4" complete="0" expand="true"/>
<task id="64" name="Output Format Module" color="#8cb6ce" meeting="false" start="2015-11-12" duration="4" complete="0" expand="true"/>
<task id="63" name="Input Parameter Module" color="#8cb6ce" meeting="false" start="2015-11-17" duration="4" complete="0" expand="true"/>
<task id="64" name="Output Format Module" color="#8cb6ce" meeting="false" start="2015-11-22" duration="4" complete="0" expand="true"/>
</task>
<task id="68" name="System Testing" color="#8cb6ce" meeting="false" start="2015-11-16" duration="3" complete="0" expand="true">
<task id="68" name="System Testing" color="#8cb6ce" meeting="false" start="2015-11-26" duration="3" complete="0" expand="true">
<depend id="21" type="2" difference="0" hardness="Strong"/>
</task>
<task id="21" name="Rev 0 Demo" color="#8cb6ce" meeting="true" start="2015-11-19" duration="0" complete="0" expand="true"/>
<task id="21" name="Rev 0 Demo" color="#8cb6ce" meeting="true" start="2015-11-29" duration="0" complete="0" expand="true"/>
<task id="69" name="Revise SRS" color="#8cb6ce" meeting="false" start="2015-11-19" duration="2" complete="0" expand="true">
<depend id="73" type="2" difference="0" hardness="Strong"/>
</task>
......
package PicPuzzle;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import java.io.File;
import java.io.IOException;
import org.junit.Test;
public class HintGeneratorTest{
@Test
public void test() throws IOException{
Nonogram ng = new Nonogram(new File("test.png"));
int[][] colHints = HintGenerator.generateColHints(ng);
int[][] rowHints = HintGenerator.generateRowHints(ng);
assertEquals(colHints[0][0],4);
assertEquals(colHints[1][0],1);
assertEquals(colHints[1][1],1);
assertEquals(colHints[2][0],1);
assertEquals(colHints[2][1],1);
assertEquals(colHints[3][0],1);
assertEquals(colHints[3][1],1);
assertEquals(colHints[4][0],1);
assertEquals(colHints[4][1],1);
assertEquals(colHints[5][0],1);
assertEquals(colHints[5][1],1);
assertEquals(colHints[6][0],1);
assertEquals(colHints[6][1],1);
assertEquals(colHints[7][0],4);
assertEquals(rowHints[0][0],4);
assertEquals(rowHints[1][0],1);
assertEquals(rowHints[1][1],1);
assertEquals(rowHints[2][0],1);
assertEquals(rowHints[2][1],1);
assertEquals(rowHints[3][0],1);
assertEquals(rowHints[3][1],1);
assertEquals(rowHints[4][0],1);
assertEquals(rowHints[4][1],1);
assertEquals(rowHints[5][0],1);
assertEquals(rowHints[5][1],1);
assertEquals(rowHints[6][0],1);
assertEquals(rowHints[6][1],1);
assertEquals(rowHints[7][0],4);
}
@Test
public void test2() throws IOException{
Nonogram ng = new Nonogram(new File("black.png"));
int[][] colHints = HintGenerator.generateColHints(ng);
int[][] rowHints = HintGenerator.generateRowHints(ng);
for (int i = 0; i < 8; i++) {
assertEquals(rowHints[i][0], 8);
assertEquals(colHints[i][0], 8);
}
}
@Test
public void test3() throws IOException{
Nonogram ng = new Nonogram(new File("white.png"));
int[][] colHints = HintGenerator.generateColHints(ng);
int[][] rowHints = HintGenerator.generateRowHints(ng);
for (int i = 0; i < 8; i++) {
assertEquals(rowHints[i][0], 0);
assertEquals(colHints[i][0], 0);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment