Commit 8e4cef1
committed
make Configuration::to_string() deterministic
tests assume that the order of elements is deterministic. Without this
you can be unlucky and get a tests failure like:
```
assertion failed: `(left == right)`'
left: `"voters=(2 3 1)&&(1) autoleave\n1: StateProbe match=0 next=0\n2: StateProbe match=0 next=1\n3: StateProbe match=0 next=1\n"`
right: `"voters=(1 2 3)&&(1) autoleave\n1: StateProbe match=0 next=0\n2: StateProbe match=0 next=1\n3: StateProbe match=0 next=1\n"`
Differences (-left|+right):
-voters=(2 3 1)&&(1) autoleave
+voters=(1 2 3)&&(1) autoleave
1: StateProbe match=0 next=0
2: StateProbe match=0 next=1
3: StateProbe match=0 next=1
```
Signed-off-by: Guillaume Girol <guillaume.girol@rubycat.eu>1 parent 7d60c11 commit 8e4cef1
1 file changed
Lines changed: 16 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
98 | 108 | | |
99 | 109 | | |
100 | 110 | | |
101 | | - | |
102 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
103 | 114 | | |
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
108 | 119 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 120 | + | |
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
0 commit comments