[hawkmoth] Re: [PATCH 06/13] test: global update to expected output

  • From: Jani Nikula <jani@xxxxxxxxxx>
  • To: Bruno Santos <brunomanuelsantos@xxxxxxxxxxxxxxxxxx>, hawkmoth@xxxxxxxxxxxxx
  • Date: Tue, 08 Jan 2019 23:22:36 +0200

On Tue, 08 Jan 2019, Bruno Santos <brunomanuelsantos@xxxxxxxxxxxxxxxxxx> wrote:

The output of the hawkmoth module was changed to nest member
documentation of a (e.g.) structure. This results in obvious conflicts
with the expected output used for testing the tool. In updating the
respective sources, the code was also cleaned up considerably yielding a
much more consistent output when it comes to white space.

Together, these break all the tests one way or another forcing us to
update them now. Hopefully, similar situations of world breakage won't
happen as easily from now on.

For some reason this doesn't apply for me, and I think some of the hunks
seem odd.

Anyway, I think I'd prefer the nesting to be a separate change, where
you could update the nesting both in code and test output at the same
go.

BR,
Jani

---
 test/compat-javadoc-basic.stdout   |  7 +++----
 test/compat-javadoc-liberal.stdout |  9 ++++-----
 test/compat-kernel-doc.stdout      | 15 +++++++--------
 test/compat.stdout                 |  3 +--
 test/doc.stdout                    |  1 -
 test/enum.stdout                   | 14 +++++++-------
 test/example-10-macro.stdout       | 10 +++++-----
 test/example-20-variable.stdout    |  8 ++++----
 test/example-30-typedef.stdout     |  2 +-
 test/example-40-enum.stdout        | 14 +++++++-------
 test/example-50-struct.stdout      | 14 +++++++-------
 test/example-70-function.stdout    |  4 ++--
 test/example-80-compat.stdout      | 20 ++++++++++----------
 test/example-90-generic.stdout     |  1 -
 test/function-like-macro.stdout    |  4 ++--
 test/function.stdout               |  2 +-
 test/simple-macro.stdout           |  2 +-
 test/struct.stdout                 | 16 ++++++++--------
 test/typedef-enum.stdout           | 16 ++++++++--------
 test/typedef-struct.stdout         | 16 ++++++++--------
 test/typedef.stdout                |  2 +-
 test/union.stdout                  | 20 ++++++++++----------
 test/variable.stdout               |  2 +-
 23 files changed, 98 insertions(+), 104 deletions(-)

diff --git a/test/compat-javadoc-basic.stdout 
b/test/compat-javadoc-basic.stdout
index 752e14b..2cd51be 100644
--- a/test/compat-javadoc-basic.stdout
+++ b/test/compat-javadoc-basic.stdout
@@ -8,17 +8,16 @@

 .. c:function:: int foo(int quick)

-
+
    :param quick: brown fox
-
+
    :return: quick brown fox
    @random quick brown fox
-
+

 .. c:function:: int kerneldoc(int quick)

    @quick: quick brown fox
    @return: quick brown fox
    @random: quick brown fox
-

diff --git a/test/compat-javadoc-liberal.stdout 
b/test/compat-javadoc-liberal.stdout
index 94e9f7a..e2c52c6 100644
--- a/test/compat-javadoc-liberal.stdout
+++ b/test/compat-javadoc-liberal.stdout
@@ -9,18 +9,17 @@

 .. c:function:: int foo(int quick)

-
+
    :param quick: brown fox
-
+
    :return: quick brown fox
-
+
    :random: quick brown fox
-
+

 .. c:function:: int kerneldoc(int quick)

    @quick: quick brown fox
    @return: quick brown fox
    @random: quick brown fox
-

diff --git a/test/compat-kernel-doc.stdout b/test/compat-kernel-doc.stdout
index 009826d..e2289fd 100644
--- a/test/compat-kernel-doc.stdout
+++ b/test/compat-kernel-doc.stdout
@@ -9,15 +9,14 @@
    @param quick brown fox
    @return quick brown fox
    @random quick brown fox
-
+

 .. c:function:: int kerneldoc(int quick)

-
-   :param quick: quick brown fox
-
-   :return: quick brown fox
-
-   :param random: quick brown fox
-
+
+   :param quick: quick brown fox
+
+   :return: quick brown fox
+
+   :param random: quick brown fox

diff --git a/test/compat.stdout b/test/compat.stdout
index d2261d8..e315d87 100644
--- a/test/compat.stdout
+++ b/test/compat.stdout
@@ -9,12 +9,11 @@
    @param quick brown fox
    @return quick brown fox
    @random quick brown fox
-
+

 .. c:function:: int kerneldoc(int quick)

    @quick: quick brown fox
    @return: quick brown fox
    @random: quick brown fox
-

diff --git a/test/doc.stdout b/test/doc.stdout
index 650c4c5..1ebad17 100644
--- a/test/doc.stdout
+++ b/test/doc.stdout
@@ -1,4 +1,3 @@

 This is a top level comment.

-
diff --git a/test/enum.stdout b/test/enum.stdout
index 8b2698b..a7a8ced 100644
--- a/test/enum.stdout
+++ b/test/enum.stdout
@@ -1,15 +1,15 @@
+
 .. c:type:: enum foo

    Enum doc.
-

-.. c:macro:: bar

-   Enumeration comment.
-
+   .. c:macro:: bar

-.. c:macro:: baz
+      Enumeration comment.

-   Another.
-
+
+   .. c:macro:: baz
+
+      Another.

diff --git a/test/example-10-macro.stdout b/test/example-10-macro.stdout
index 5b98ff1..c645ebb 100644
--- a/test/example-10-macro.stdout
+++ b/test/example-10-macro.stdout
@@ -1,20 +1,20 @@
+
 .. c:macro:: FAILURE

    Failure status.
-
+

 .. c:function:: DIE()

    Terminate immediately with failure status.
-
+
    See :c:macro:`FAILURE`.
-
+

 .. c:function:: ARRAY_SIZE(array)

    Get the number of elements in an array.
-
+
    :param array: An array
    :return: Array size
-

diff --git a/test/example-20-variable.stdout b/test/example-20-variable.stdout
index 0cb0c03..17b7c7b 100644
--- a/test/example-20-variable.stdout
+++ b/test/example-20-variable.stdout
@@ -1,12 +1,12 @@
+
 .. c:var:: const int meaning_of_life

    The name says it all.
-
+

 .. c:var:: struct list * entries

    The list of entries.
-
-   Use :c:func:`frob` to frobnicate, always in :c:macro:`MODE_PRIMARY` mode.
-
+
+   Use :c:func:`frob` to frobnicate, always in :c:macro:`MODE_PRIMARY` mode.

diff --git a/test/example-30-typedef.stdout b/test/example-30-typedef.stdout
index ba77421..4314f1b 100644
--- a/test/example-30-typedef.stdout
+++ b/test/example-30-typedef.stdout
@@ -1,5 +1,5 @@
+
 .. c:type:: list_data_t

    Typedef documentation.
-

diff --git a/test/example-40-enum.stdout b/test/example-40-enum.stdout
index 6e5476d..75000b3 100644
--- a/test/example-40-enum.stdout
+++ b/test/example-40-enum.stdout
@@ -1,15 +1,15 @@
+
 .. c:type:: enum mode

    Frobnication modes for :c:func:`frob`.
-

-.. c:macro:: MODE_PRIMARY

-   The primary frobnication mode.
-
+   .. c:macro:: MODE_PRIMARY

-.. c:macro:: MODE_SECONDARY
+      The primary frobnication mode.

-   The secondary frobnication mode.
-
+
+   .. c:macro:: MODE_SECONDARY
+
+      The secondary frobnication mode.

diff --git a/test/example-50-struct.stdout b/test/example-50-struct.stdout
index 77e6361..2eff861 100644
--- a/test/example-50-struct.stdout
+++ b/test/example-50-struct.stdout
@@ -1,15 +1,15 @@
+
 .. c:type:: struct list

    Linked list node.
-

-.. c:member:: struct list * list.next

-   Next node.
-
+   .. c:member:: struct list * next

-.. c:member:: int list.data
+      Next node.

-   Data.
-
+
+   .. c:member:: int data
+
+      Data.

diff --git a/test/example-70-function.stdout b/test/example-70-function.stdout
index aaed616..0bdcdb0 100644
--- a/test/example-70-function.stdout
+++ b/test/example-70-function.stdout
@@ -1,10 +1,10 @@
+
 .. c:function:: int frob(struct list * list, enum mode mode)

    List frobnicator.
-
+
    :param list: The list to frob.
    :param mode: The frobnication mode.
    :return: 0 on success, non-zero error code on error.
    :since: v0.1
-

diff --git a/test/example-80-compat.stdout b/test/example-80-compat.stdout
index cd53beb..b81e629 100644
--- a/test/example-80-compat.stdout
+++ b/test/example-80-compat.stdout
@@ -1,14 +1,14 @@
+
 .. c:function:: int frob2(struct list * list, enum mode mode)

    List frobnicator.
-
-
-   :param list: The list to frob.
-
-   :param mode: The frobnication mode.
-
-   :return: 0 on success, non-zero error code on error.
-
-   :since: v0.1
-
+
+
+   :param list: The list to frob.
+
+   :param mode: The frobnication mode.
+
+   :return: 0 on success, non-zero error code on error.
+
+   :since: v0.1

diff --git a/test/example-90-generic.stdout b/test/example-90-generic.stdout
index 42b0278..e185c21 100644
--- a/test/example-90-generic.stdout
+++ b/test/example-90-generic.stdout
@@ -4,4 +4,3 @@ constructs. They will be included as generic documentation 
comments, for
 example to describe the design of :c:type:`list` frobnication using
 :c:func:`frob`.

-
diff --git a/test/function-like-macro.stdout b/test/function-like-macro.stdout
index bc2dc3b..b9e37ba 100644
--- a/test/function-like-macro.stdout
+++ b/test/function-like-macro.stdout
@@ -1,10 +1,10 @@
+
 .. c:function:: FOO(bar, baz)

    A function-like macro.
-
+

 .. c:function:: BAR()

    Another
-

diff --git a/test/function.stdout b/test/function.stdout
index 4c95241..e3705ee 100644
--- a/test/function.stdout
+++ b/test/function.stdout
@@ -1,5 +1,5 @@
+
 .. c:function:: int foo(int bar, int baz)

    Foo function.
-

diff --git a/test/simple-macro.stdout b/test/simple-macro.stdout
index 7e04d90..7532231 100644
--- a/test/simple-macro.stdout
+++ b/test/simple-macro.stdout
@@ -1,5 +1,5 @@
+
 .. c:macro:: FOO

    A simple macro.
-

diff --git a/test/struct.stdout b/test/struct.stdout
index 92bb402..1a0fa60 100644
--- a/test/struct.stdout
+++ b/test/struct.stdout
@@ -1,17 +1,17 @@
+
 .. c:type:: struct sample_struct

    This is a sample struct
-
+
    Woohoo.
-

-.. c:member:: int sample_struct.jesh

-   member
-
+   .. c:member:: int jesh

-.. c:member:: struct sample_struct * sample_struct.next
+      member

-   foo next
-
+
+   .. c:member:: struct sample_struct * next
+
+      foo next

diff --git a/test/typedef-enum.stdout b/test/typedef-enum.stdout
index 831cb5e..44ef1a2 100644
--- a/test/typedef-enum.stdout
+++ b/test/typedef-enum.stdout
@@ -1,20 +1,20 @@
+
 .. c:type:: enum named

    named typedeffed enum
-

-.. c:macro:: damn

-   named enumeration
-
+   .. c:macro:: damn
+
+      named enumeration
+

 .. c:type:: unnamed_t

    unnamed typedeffed enum
-

-.. c:macro:: shit

-   unnamed enumeration
-
+   .. c:macro:: shit
+
+      unnamed enumeration

diff --git a/test/typedef-struct.stdout b/test/typedef-struct.stdout
index fa381ec..bb46f1f 100644
--- a/test/typedef-struct.stdout
+++ b/test/typedef-struct.stdout
@@ -1,20 +1,20 @@
+
 .. c:type:: struct named

    named typedeffed struct
-

-.. c:member:: int named.m

-   named member
-
+   .. c:member:: int m
+
+      named member
+

 .. c:type:: typedef_struct

    unnamed typedeffed struct
-

-.. c:member:: int typedef_struct.m

-   unnamed member
-
+   .. c:member:: int m
+
+      unnamed member

diff --git a/test/typedef.stdout b/test/typedef.stdout
index 83fd2dc..dca0a85 100644
--- a/test/typedef.stdout
+++ b/test/typedef.stdout
@@ -1,5 +1,5 @@
+
 .. c:type:: boo

    Typedef comment.
-

diff --git a/test/union.stdout b/test/union.stdout
index 6821b30..8298e1f 100644
--- a/test/union.stdout
+++ b/test/union.stdout
@@ -1,20 +1,20 @@
+
 .. c:type:: union foo

    Union documentation.
-

-.. c:member:: int foo.foo

-   int member 1.
-
+   .. c:member:: int foo

-.. c:member:: int foo.bar
+      int member 1.

-   int member 2.
-

-.. c:member:: struct _baz foo._baz
+   .. c:member:: int bar

-   struct member.
-
+      int member 2.
+
+
+   .. c:member:: struct _baz _baz
+
+      struct member.

diff --git a/test/variable.stdout b/test/variable.stdout
index ddbeeb3..4efaece 100644
--- a/test/variable.stdout
+++ b/test/variable.stdout
@@ -1,5 +1,5 @@
+
 .. c:var:: int sheesh

    This is a variable document.
-

--
2.20.1

Other related posts: