mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 14:47:13 -04:00
feat: add test for appflowy_editor path (#1926)
This commit is contained in:
parent
45045beeb9
commit
99f0fad74c
1 changed files with 38 additions and 0 deletions
|
@ -29,5 +29,43 @@ void main() async {
|
||||||
expect(p2 <= p1, true);
|
expect(p2 <= p1, true);
|
||||||
expect(p1.equals(p2), true);
|
expect(p1.equals(p2), true);
|
||||||
});
|
});
|
||||||
|
test(
|
||||||
|
"test path next, previous and parent getters",
|
||||||
|
() {
|
||||||
|
var p1 = [0, 0];
|
||||||
|
var p2 = [0, 1];
|
||||||
|
|
||||||
|
expect(p1.next.equals(p2), true);
|
||||||
|
expect(p1.previous.equals(p2), false);
|
||||||
|
expect(p1.parent.equals(p2), false);
|
||||||
|
|
||||||
|
p1 = [0, 1, 0];
|
||||||
|
p2 = [0, 1, 1];
|
||||||
|
|
||||||
|
expect(p2.next.equals(p1), false);
|
||||||
|
expect(p2.previous.equals(p1), true);
|
||||||
|
expect(p2.parent.equals(p1), false);
|
||||||
|
|
||||||
|
p1 = [0, 1, 1];
|
||||||
|
p2 = [0, 1, 1];
|
||||||
|
|
||||||
|
expect(p1.next.equals(p2), false);
|
||||||
|
expect(p1.previous.equals(p2), false);
|
||||||
|
expect(p1.parent.equals(p2), false);
|
||||||
|
|
||||||
|
p1 = [];
|
||||||
|
p2 = [];
|
||||||
|
|
||||||
|
expect(p1.next.equals(p2), true);
|
||||||
|
expect(p2.previous.equals(p1), true);
|
||||||
|
expect(p1.parent.equals(p2), true);
|
||||||
|
|
||||||
|
p1 = [1, 0, 2];
|
||||||
|
p2 = [1, 0];
|
||||||
|
|
||||||
|
expect(p1.parent.equals(p2), true);
|
||||||
|
expect(p2.parent.equals(p1), false);
|
||||||
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue