Updated tests to check for the new view behaviours and to avoid the comeback of the bugs I fixed today

This commit is contained in:
Andrea Aime 2005-12-30 17:57:40 +00:00
parent 27efa03869
commit 8869faf749
12 changed files with 118 additions and 30 deletions

17
testdata/dot-ref/MultiAssoc.dot vendored Normal file
View File

@ -0,0 +1,17 @@
#!/usr/local/bin/dot
#
# Class diagram
# Generated by UmlGraph version 4.1 (http://www.spinellis.gr/sw/umlgraph)
#
digraph G {
edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
node [fontname="Helvetica",fontsize=10,shape=record];
// A
c73 [label="A", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// C
c75 [label="C", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// A depend C
c73 -> c75 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
}

View File

@ -8,22 +8,22 @@ digraph G {
edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
node [fontname="Helvetica",fontsize=10,shape=record];
// gr.spinellis.invoice.InvoiceItem
c27 [label="InvoiceItem", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c140 [label="InvoiceItem", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.Invoice
c28 [label="Invoice", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c141 [label="Invoice", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.Customer
c29 [label="Customer", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c142 [label="Customer", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.product.Product
c30 [label="Product", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c143 [label="Product", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.product.Category
c31 [label="Category", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c144 [label="Category", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.InvoiceItem assoc gr.spinellis.product.Product
c27 -> c30 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c140 -> c143 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.invoice.Invoice assoc gr.spinellis.invoice.Customer
c28 -> c29 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c141 -> c142 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.invoice.Invoice composed gr.spinellis.invoice.InvoiceItem
c28 -> c27 [taillabel="1", label="", headlabel="*", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none, arrowtail=diamond];
c141 -> c140 [taillabel="1", label="", headlabel="*", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none, arrowtail=diamond];
// gr.spinellis.product.Product assoc gr.spinellis.product.Category
c30 -> c31 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c143 -> c144 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
}

View File

@ -8,22 +8,22 @@ digraph G {
edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
node [fontname="Helvetica",fontsize=10,shape=record];
// gr.spinellis.invoice.InvoiceItem
c18 [label="{InvoiceItem\n|product : Product\lquantity : int\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c130 [label="{InvoiceItem\n|product : Product\lquantity : int\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.Invoice
c19 [label="{Invoice\n|total : double\litems : InvoiceItem[]\lcustomer : Customer\l|addItem(p : Product, quantity : int)\l}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c131 [label="{Invoice\n|total : double\litems : InvoiceItem[]\lcustomer : Customer\l|addItem(p : Product, quantity : int)\l}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.Customer
c20 [label="{Customer\n|name : String\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c132 [label="{Customer\n|name : String\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.product.Product
c21 [label="{Product\n|name : String\lstock : int\lprice : double\lcategory : Category\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c133 [label="{Product\n|name : String\lstock : int\lprice : double\lcategory : Category\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.product.Category
c22 [label="{Category\n|name : String\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c134 [label="{Category\n|name : String\lproducts : List\<\>\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.InvoiceItem assoc gr.spinellis.product.Product
c18 -> c21 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c130 -> c133 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.invoice.Invoice assoc gr.spinellis.invoice.Customer
c19 -> c20 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c131 -> c132 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.invoice.Invoice composed gr.spinellis.invoice.InvoiceItem
c19 -> c18 [taillabel="1", label="", headlabel="*", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none, arrowtail=diamond];
c131 -> c130 [taillabel="1", label="", headlabel="*", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none, arrowtail=diamond];
// gr.spinellis.product.Product assoc gr.spinellis.product.Category
c21 -> c22 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c133 -> c134 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
}

View File

@ -8,22 +8,22 @@ digraph G {
edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
node [fontname="Helvetica",fontsize=10,shape=record];
// gr.spinellis.invoice.InvoiceItem
c9 [label="{InvoiceItem\n|product\lquantity\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
c120 [label="{InvoiceItem\n|product\lquantity\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
// gr.spinellis.invoice.Invoice
c10 [label="{Invoice\n|total\litems\lcustomer\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
c121 [label="{Invoice\n|total\litems\lcustomer\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
// gr.spinellis.invoice.Customer
c11 [label="{Customer\n|name\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
c122 [label="{Customer\n|name\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
// gr.spinellis.product.Product
c12 [label="{Product\n|name\lstock\lprice\lcategory\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
c123 [label="{Product\n|name\lstock\lprice\lcategory\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
// gr.spinellis.product.Category
c13 [label="{Category\n|name\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
c124 [label="{Category\n|name\lproducts\l|}", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=16.0];
// gr.spinellis.invoice.InvoiceItem assoc gr.spinellis.product.Product
c9 -> c12 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c120 -> c123 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.invoice.Invoice assoc gr.spinellis.invoice.Customer
c10 -> c11 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c121 -> c122 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.invoice.Invoice composed gr.spinellis.invoice.InvoiceItem
c10 -> c9 [taillabel="1", label="", headlabel="*", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none, arrowtail=diamond];
c121 -> c120 [taillabel="1", label="", headlabel="*", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none, arrowtail=diamond];
// gr.spinellis.product.Product assoc gr.spinellis.product.Category
c12 -> c13 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c123 -> c124 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
}

33
testdata/dot-ref/ViewColors.dot vendored Normal file
View File

@ -0,0 +1,33 @@
#!/usr/local/bin/dot
#
# Class diagram
# Generated by UmlGraph version 4.1 (http://www.spinellis.gr/sw/umlgraph)
#
digraph G {
edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
node [fontname="Helvetica",fontsize=10,shape=record];
// gr.spinellis.invoice.InvoiceItem
c0 [label="InvoiceItem", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.Invoice
c1 [label="Invoice", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.Customer
c2 [label="Customer", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=10.0];
// gr.spinellis.product.Product
c3 [label="Product", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=10.0];
// gr.spinellis.product.Category
c4 [label="Category", fontname="Helvetica", style=filled, fillcolor="yellow", fontcolor="black", fontsize=10.0];
// gr.spinellis.invoice.InvoiceItem assoc gr.spinellis.product.Product
c0 -> c3 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.invoice.Invoice assoc gr.spinellis.invoice.Customer
c1 -> c2 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.invoice.Invoice composed gr.spinellis.invoice.InvoiceItem
c1 -> c0 [taillabel="1", label="", headlabel="*", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none, arrowtail=diamond];
// gr.spinellis.product.Product assoc gr.spinellis.product.Category
c3 -> c4 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
// gr.spinellis.product.Category depend java.util.List
c4 -> c10 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
// java.util.List<E>
c10 [label="«interface» \nList\<E\>", fontname="Helvetica-Oblique", style=filled, fillcolor="gray", fontcolor="black", fontsize=10.0, URL="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html"];
}

View File

@ -8,10 +8,10 @@ digraph G {
edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
node [fontname="Helvetica",fontsize=10,shape=record];
// gr.spinellis.product.Product
c3 [label="{Product\n|name\lstock\lprice\lcategory\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c102 [label="{Product\n|name\lstock\lprice\lcategory\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.product.Category
c4 [label="{Category\n|name\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
c103 [label="{Category\n|name\lproducts\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
// gr.spinellis.product.Product assoc gr.spinellis.product.Category
c3 -> c4 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
c102 -> c103 [taillabel="*", label="", headlabel="1", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=none];
}

18
testdata/java/MultiAssoc.java vendored Normal file
View File

@ -0,0 +1,18 @@
// $Id$
// Regression test: there was a bug that made UMLGraph skip all associations
// of one kind if the first one was not to be printed (and more in general,
// to skip all those that followed the one with a hidden destination)
/**
* @opt hide B
* @hidden
*/
class UMLOptions {}
/**
* @depend - - - B
* @depend - - - C
*/
class A {}
class B {}
class C {}

View File

@ -1,6 +1,11 @@
package gr.spinellis.product;
import java.util.*;
/**
* @depend - - - java.util.List
*/
public class Category {
public String name;
List products;
}

View File

@ -2,6 +2,7 @@ package gr.spinellis.views;
/**
* @view
* @opt hide java.*
*/
public class ViewAll {
}

View File

@ -2,6 +2,7 @@ package gr.spinellis.views;
/**
* @view
* @opt hide java.*
*
* @match gr.spinellis.*
* @opt attributes

View File

@ -2,6 +2,7 @@ package gr.spinellis.views;
/**
* @view
* @opt hide java.*
*
* @match gr.spinellis.*
* @opt attributes

View File

@ -0,0 +1,12 @@
package gr.spinellis.views;
/**
* @view
* @match .*
* @opt nodefillcolor gray
* @match gr.spinellis.*
* @opt nodefillcolor yellow
*/
public class ViewColors {
}