Skip to content

Commit 6d4c487

Browse files
committed
Correct the test output to follow UML semantics
1 parent 25a0f9e commit 6d4c487

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
classDiagram
22
class A {
3-
x
3+
x : P
44
}
55
class B {
6-
x
6+
x : P
77
}
88
class C {
9-
x
9+
x : P
1010
}
1111
class D {
12-
x
12+
x : P
1313
}
1414
class E {
15-
x
15+
x : P
1616
}
1717
class P {
1818
}
19-
P --* A : x
20-
P --* C : x
19+
P --o A : x
20+
P --o B : x
21+
P --o C : x
2122
P --* D : x
2223
P --* E : x
23-
P --o B : x

tests/pyreverse/functional/class_diagrams/aggregation/fields.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ class P:
44
pass
55

66
class A:
7-
x: P
7+
x: P # can't tell, so default to aggregation
88

99
class B:
1010
def __init__(self, x: P):
11-
self.x = x
11+
self.x = x # not instantiated, so aggregation
1212

1313
class C:
1414
x: P
1515

1616
def __init__(self, x: P):
17-
self.x = x
17+
self.x = x # not instantiated, so aggregation
1818

1919
class D:
2020
x: P
2121

2222
def __init__(self):
23-
self.x = P()
23+
self.x = P() # instantiated, so composition
2424

2525
class E:
2626
def __init__(self):
27-
self.x = P()
27+
self.x = P() # instantiated, so composition

0 commit comments

Comments
 (0)