1 ! Copyright (C) 2023 Jean-Marc Lugrin.
2 ! See https://factorcode.org/license.txt for BSD license.
4 USING: tools.test classes.prettyprinter assocs io.streams.string ;
5 IN: classes.prettyprinter.tests
9 TUPLE: tchild1 < troot aa ;
11 TUPLE: tchild2 < troot bb ;
13 { { tchild1 tchild2 } } [ troot class-hierarchy at ] unit-test
15 [ f hierarchy. ] must-fail
17 { "t < word\n" } [ [ t hierarchy. ] with-string-writer ] unit-test
18 { "tchild1 < troot < tuple\n" } [ [ tchild1 hierarchy. ] with-string-writer ] unit-test
19 { "troot < tuple\n| tchild1 IN: classes.prettyprinter.tests\n| tchild2 IN: classes.prettyprinter.tests\n" }
20 [ [ troot hierarchy. ] with-string-writer ] unit-test