From 22822bed2641985141a0d7b873d794b5f74430c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Schmelzer?= Date: Mon, 11 Mar 2019 09:11:31 +0100 Subject: [PATCH] move indentation tests to diagram test files --- test/plantuml-indentation-class-test.el | 22 ++++++ test/plantuml-indentation-deployment-test.el | 20 ++++++ test/plantuml-indentation-test.el | 75 -------------------- 3 files changed, 42 insertions(+), 75 deletions(-) diff --git a/test/plantuml-indentation-class-test.el b/test/plantuml-indentation-class-test.el index e4f7327..7da686b 100644 --- a/test/plantuml-indentation-class-test.el +++ b/test/plantuml-indentation-class-test.el @@ -312,6 +312,28 @@ together { } ")) + + +(ert-deftest platuml-test-block-indentation/package-interface-nested () + "Test correct indentation of two nested blocks, a package and an interface +Note: package is used in deployment and object diagrams as well, see there for more tests." + (plantuml-test-indent-block + " +package foo { +interface Bar { +baz +} +} +" + " +package foo { + interface Bar { + baz + } +} +")) + + (provide 'plantuml-indentation-class-test) ;;; plantuml-indentation-class-test.el ends here diff --git a/test/plantuml-indentation-deployment-test.el b/test/plantuml-indentation-deployment-test.el index c8d0529..aacbca7 100644 --- a/test/plantuml-indentation-deployment-test.el +++ b/test/plantuml-indentation-deployment-test.el @@ -86,6 +86,26 @@ storage Foo7 { } ")) +(ert-deftest plantuml-test-block-indentation/package-database-nested () + "Test correct indentation of two nested blocks, a package and a database. +Note: package is used in class and object diagrams as well, see there for more tests." + (plantuml-test-indent-block + " +package APackage { + database ADatabase { + A -> B + } +} +" + " +package APackage { + database ADatabase { + A -> B + } +} +")) + + (provide 'plantuml-indentation-deployment-test) ;;; plantuml-indentation-deployment-test.el ends here diff --git a/test/plantuml-indentation-test.el b/test/plantuml-indentation-test.el index 1d94f66..785b3e5 100644 --- a/test/plantuml-indentation-test.el +++ b/test/plantuml-indentation-test.el @@ -269,44 +269,6 @@ package APackage () package APackage () ")) -(ert-deftest plantuml-test-block-indentation/package () - "Test correct indentation of a package block." - (plantuml-test-indent-block - " -package APackage { -A -> B -} -" - " -package APackage { - A -> B -} -")) - -(ert-deftest platuml-test-block-indentation/class () - "Test correct indentation of a class block" - (plantuml-test-indent-block - " -class Foo { -+bar() -} -" - " -class Foo { - +bar() -} -") - (plantuml-test-indent-block - " -abstract class Foo { -+bar() -} -" - " -abstract class Foo { - +bar() -} -")) (ert-deftest platuml-test-block-indentation/box () "Test correct indentation of a box block" @@ -325,43 +287,6 @@ end box " )) -(ert-deftest plantuml-test-block-indentation/package-database-nested () - "Test correct indentation of two nested blocks, a package and a database. -Note: currently the inner database is not indented." - (plantuml-test-indent-block - " -package APackage { - database ADatabase { - A -> B - } -} -" - " -package APackage { - database ADatabase { - A -> B - } -} -")) - -(ert-deftest platuml-test-block-indentation/package-interface-nested () - "Test correct indentation of two nested blocks, a package and an interface" - (plantuml-test-indent-block - " -package foo { -interface Bar { -baz -} -} -" - " -package foo { - interface Bar { - baz - } -} -")) - (ert-deftest plantuml-test-block-indentation/alt-end () "Test correct indentation of an alt-end block. The alt-keyword is NOT followed by some text."