include block naming in opdef test

This commit is contained in:
Jonathan Shook 2021-03-10 13:00:57 -06:00
parent ea8702c905
commit af4452bebf
2 changed files with 26 additions and 2 deletions

View File

@ -138,8 +138,11 @@ public class OpDefTest {
StmtsBlock block1 = doc2.getBlocks().get(0);
assertThat(block1.getOps()).hasSize(1);
OpTemplate op0 = block1.getOps().get(0);
assertThat(op0.getName()).isEqualTo("list-of-named-map--block0--s1");
System.out.println(op0.getParams());
assertThat(op0.getName()).isEqualTo("list-of-named-map--block1--s1");
assertThat(op0.getStmt()).isNull();
// System.out.println("here");
// TODO: This needs to be clarified and the logic made less ambiguous
// assertThat(op0.getParams()).hasSize(1);
// assertThat(op0.getParams()).containsExactlyEntriesOf(Map.of("p1", "v2", "p2", "v2", "p3", "v3"));

View File

@ -9,8 +9,29 @@ name: string-statement
statement: "test statement"
---
name: list-of-named-map
params:
global: value
topic_uri: "My topic URI"
blocks:
- statements:
- s1:
p1: v1
p2: v2
p3: v3
---
name: list-of-named-map-canonical
statements:
- s1:
p1: v1
p2: v2
p3: v3
params:
p3: v3
---
blocks:
block1:
s1:
p1: v2
block2:
s2:
p3: v4