diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-02 08:02:52 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-02 08:02:52 +0100 |
commit | 833a7b929f6e386eadd8c01ea54b9bb8b8d0f67a (patch) | |
tree | e3f7e8198b9ae17a6bce664ea47af1a2cb5dcd58 | |
parent | modules: Update rtems (diff) | |
download | rtems-central-833a7b929f6e386eadd8c01ea54b9bb8b8d0f67a.tar.bz2 |
validation: Wrap comment blocks
-rw-r--r-- | rtemsspec/tests/test_validation.py | 31 | ||||
-rw-r--r-- | rtemsspec/validation.py | 4 |
2 files changed, 18 insertions, 17 deletions
diff --git a/rtemsspec/tests/test_validation.py b/rtemsspec/tests/test_validation.py index bac281d3..8b75fe23 100644 --- a/rtemsspec/tests/test_validation.py +++ b/rtemsspec/tests/test_validation.py @@ -496,8 +496,8 @@ static void Directive_Post_Id_Check( switch ( state ) { case Directive_Post_Id_Nop: { /* - * The value of the object identifier referenced by the id parameter shall - * be the value before the call to rtems_task_ident(). + * The value of the object identifier referenced by the id parameter + * shall be the value before the call to rtems_task_ident(). */ T_eq_ptr(ctx->id, &ctx->id_value); T_eq_u32(ctx->id_value, 0xffffffff); @@ -514,8 +514,8 @@ static void Directive_Post_Id_Check( case Directive_Post_Id_Self: { /* - * The value of the object identifier referenced by the id parameter shall - * be the identifier of the executing thread. + * The value of the object identifier referenced by the id parameter + * shall be the identifier of the executing thread. */ T_eq_ptr(ctx->id, &ctx->id_value); T_eq_u32(ctx->id_value, rtems_task_self()); @@ -524,10 +524,10 @@ static void Directive_Post_Id_Check( case Directive_Post_Id_LocalTask: { /* - * The value of the object identifier referenced by the id parameter shall - * be the identifier of a local task with a name equal to the name - * parameter. If more than one local task with such a name exists, then it - * shall be the identifier of the task with the lowest object index. + * The value of the object identifier referenced by the id parameter + * shall be the identifier of a local task with a name equal to the name + * parameter. If more than one local task with such a name exists, then + * it shall be the identifier of the task with the lowest object index. */ T_eq_ptr(ctx->id, &ctx->id_value); T_eq_u32(ctx->id_value, ctx->id_local_task); @@ -536,13 +536,14 @@ static void Directive_Post_Id_Check( case Directive_Post_Id_RemoteTask: { /* - * The value of the object identifier referenced by the id parameter shall - * be the identifier of a remote task on a eligible node defined by the node - * parameter with a name equal to the name parameter. If more than one task - * with such a name exists on the same node, then it shall be the identifier - * of the task with the lowest object index. If more than one task with - * such a name exists on different eligible nodes, then it shall be the - * identifier of the task with the lowest node index. + * The value of the object identifier referenced by the id parameter + * shall be the identifier of a remote task on a eligible node defined by + * the node parameter with a name equal to the name parameter. If more + * than one task with such a name exists on the same node, then it shall + * be the identifier of the task with the lowest object index. If more + * than one task with such a name exists on different eligible nodes, + * then it shall be the identifier of the task with the lowest node + * index. */ T_eq_ptr(ctx->id, &ctx->id_value); T_eq_u32(ctx->id_value, ctx->id_remote_task); diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py index 0eb49fe4..204e7c92 100644 --- a/rtemsspec/validation.py +++ b/rtemsspec/validation.py @@ -215,7 +215,7 @@ class _TestItem: content.add(self.substitute_code(action["action-code"])) for check in action["checks"]: with content.comment_block(): - content.add(self.substitute_text(check["brief"])) + content.wrap(self.substitute_text(check["brief"])) content.append(self.substitute_text(check["code"])) return actions @@ -808,7 +808,7 @@ class _ActionRequirementTestItem(_TestItem): content.add(f"case {enum[state_index + 1]}: {{") with content.indent(): with content.comment_block(): - content.append( + content.wrap( self.substitute_text(state["text"])) content.append( self.substitute_code(state["test-code"])) |