You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Marco Speranza (Created) (JIRA)" <ji...@apache.org> on 2012/02/02 22:24:54 UTC
[jira] [Created] (SANDBOX-382) Add new test for coloring
Add new test for coloring
-------------------------
Key: SANDBOX-382
URL: https://issues.apache.org/jira/browse/SANDBOX-382
Project: Commons Sandbox
Issue Type: Sub-task
Components: Graph
Reporter: Marco Speranza
Add new test cases for backtracking and greedy algorithm:
* Test a Null graph
* test a null color list
* test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SANDBOX-382) Add new test for coloring
Posted by "Marco Speranza (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Speranza updated SANDBOX-382:
-----------------------------------
Attachment: SANDBOX-382_AddedColoringTestCase_Modified_2.patch
Hi Simo, here is the modified patch. sorry about that. ;-)
> Add new test for coloring
> -------------------------
>
> Key: SANDBOX-382
> URL: https://issues.apache.org/jira/browse/SANDBOX-382
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: Graph
> Reporter: Marco Speranza
> Attachments: SANDBOX-382_AddedColoringTestCase.patch, SANDBOX-382_AddedColoringTestCase_Modified.patch, SANDBOX-382_AddedColoringTestCase_Modified_2.patch
>
>
> Add new test cases for backtracking and greedy algorithm:
> * Test a Null graph
> * test a null color list
> * test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SANDBOX-382) Add new test for coloring
Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200074#comment-13200074 ]
Simone Tripodi commented on SANDBOX-382:
----------------------------------------
don't worry ;)
once applied your patch and executed the tests from CLI, I got the following error:
{code}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project commons-graph: Compilation failure: Compilation failure:
[ERROR] /Users/simonetripodi/Documents/workspace/commons-graph/src/test/java/org/apache/commons/graph/coloring/GraphColoringBackTrackingTestCase.java:[51,16] incompatible types; inferred type argument(s) org.apache.commons.graph.Vertex,org.apache.commons.graph.Edge,java.lang.Object do not conform to bounds of type variable(s) V,E,G
[ERROR] found : <V,E,G>org.apache.commons.graph.coloring.ColorsBuilder<V,E,G>
[ERROR] required: java.lang.Object
[ERROR] /Users/simonetripodi/Documents/workspace/commons-graph/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java:[51,16] incompatible types; inferred type argument(s) org.apache.commons.graph.Vertex,org.apache.commons.graph.Edge,java.lang.Object do not conform to bounds of type variable(s) V,E,G
[ERROR] found : <V,E,G>org.apache.commons.graph.coloring.ColorsBuilder<V,E,G>
[ERROR] required: java.lang.Object
{code}
hint: you should cast the {{null}} graph argument, or avoiding to chain next methods on null graph
> Add new test for coloring
> -------------------------
>
> Key: SANDBOX-382
> URL: https://issues.apache.org/jira/browse/SANDBOX-382
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: Graph
> Reporter: Marco Speranza
> Attachments: SANDBOX-382_AddedColoringTestCase.patch, SANDBOX-382_AddedColoringTestCase_Modified.patch, SANDBOX-382_AddedColoringTestCase_Modified_2.patch
>
>
> Add new test cases for backtracking and greedy algorithm:
> * Test a Null graph
> * test a null color list
> * test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SANDBOX-382) Add new test for coloring
Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200049#comment-13200049 ]
Simone Tripodi commented on SANDBOX-382:
----------------------------------------
Hi Marco,
looks like the {{NotEnoughColorsException}} implementation is not included in the patch, maybe you missed the {{svn add}}...
Can you provide a new one, please?
TIA!
> Add new test for coloring
> -------------------------
>
> Key: SANDBOX-382
> URL: https://issues.apache.org/jira/browse/SANDBOX-382
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: Graph
> Reporter: Marco Speranza
> Attachments: SANDBOX-382_AddedColoringTestCase.patch, SANDBOX-382_AddedColoringTestCase_Modified.patch
>
>
> Add new test cases for backtracking and greedy algorithm:
> * Test a Null graph
> * test a null color list
> * test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SANDBOX-382) Add new test for coloring
Posted by "Simone Tripodi (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simone Tripodi resolved SANDBOX-382.
------------------------------------
Resolution: Fixed
Assignee: Simone Tripodi
Cool, patch applied, see [r1240375|http://svn.apache.org/viewvc?rev=1240375&view=rev], thanks!
I did a minor modification on the {{NotEnoughColorsException}}, since the message was always the same.
> Add new test for coloring
> -------------------------
>
> Key: SANDBOX-382
> URL: https://issues.apache.org/jira/browse/SANDBOX-382
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: Graph
> Reporter: Marco Speranza
> Assignee: Simone Tripodi
> Attachments: SANDBOX-382_AddedColoringTestCase.patch, SANDBOX-382_AddedColoringTestCase_Modified.patch, SANDBOX-382_AddedColoringTestCase_Modified_2.patch, SANDBOX-382_AddedColoringTestCase_Modified_3.patch
>
>
> Add new test cases for backtracking and greedy algorithm:
> * Test a Null graph
> * test a null color list
> * test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SANDBOX-382) Add new test for coloring
Posted by "Marco Speranza (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Speranza updated SANDBOX-382:
-----------------------------------
Attachment: SANDBOX-382_AddedColoringTestCase.patch
Hi all,
here is my patch, I added some test cases
Moreover I put a throw GraphException for the method applyingBackTrackingAlgorithm, in order to unify the behavior between backtracking algorithm and greedy algorithm
> Add new test for coloring
> -------------------------
>
> Key: SANDBOX-382
> URL: https://issues.apache.org/jira/browse/SANDBOX-382
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: Graph
> Reporter: Marco Speranza
> Attachments: SANDBOX-382_AddedColoringTestCase.patch
>
>
> Add new test cases for backtracking and greedy algorithm:
> * Test a Null graph
> * test a null color list
> * test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SANDBOX-382) Add new test for coloring
Posted by "Marco Speranza (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Speranza updated SANDBOX-382:
-----------------------------------
Attachment: SANDBOX-382_AddedColoringTestCase_Modified_3.patch
Ciao Simo, I fixed the error. The Eclipse doesn't catch this error :-)
> Add new test for coloring
> -------------------------
>
> Key: SANDBOX-382
> URL: https://issues.apache.org/jira/browse/SANDBOX-382
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: Graph
> Reporter: Marco Speranza
> Attachments: SANDBOX-382_AddedColoringTestCase.patch, SANDBOX-382_AddedColoringTestCase_Modified.patch, SANDBOX-382_AddedColoringTestCase_Modified_2.patch, SANDBOX-382_AddedColoringTestCase_Modified_3.patch
>
>
> Add new test cases for backtracking and greedy algorithm:
> * Test a Null graph
> * test a null color list
> * test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SANDBOX-382) Add new test for coloring
Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199565#comment-13199565 ]
Simone Tripodi commented on SANDBOX-382:
----------------------------------------
HI Marco,
patch looks good, 2 minor observation before applying it:
* {{GraphException}} is a runtime exception, so test methods shouldn't explicitly throw it;
* I would suggets to create a proper layer exception that extends {{GraphException}}, just like {{PathNotFoundException}} in the shortest path algorithms.
Can you modify the patch please?
TIA!
> Add new test for coloring
> -------------------------
>
> Key: SANDBOX-382
> URL: https://issues.apache.org/jira/browse/SANDBOX-382
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: Graph
> Reporter: Marco Speranza
> Attachments: SANDBOX-382_AddedColoringTestCase.patch
>
>
> Add new test cases for backtracking and greedy algorithm:
> * Test a Null graph
> * test a null color list
> * test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SANDBOX-382) Add new test for coloring
Posted by "Marco Speranza (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Speranza updated SANDBOX-382:
-----------------------------------
Attachment: SANDBOX-382_AddedColoringTestCase_Modified.patch
Hi Simo, I modified my patch in that way..
thanks for tip.
ciao
> Add new test for coloring
> -------------------------
>
> Key: SANDBOX-382
> URL: https://issues.apache.org/jira/browse/SANDBOX-382
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: Graph
> Reporter: Marco Speranza
> Attachments: SANDBOX-382_AddedColoringTestCase.patch, SANDBOX-382_AddedColoringTestCase_Modified.patch
>
>
> Add new test cases for backtracking and greedy algorithm:
> * Test a Null graph
> * test a null color list
> * test an empty graph
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira