diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-18 09:38:03 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-19 08:22:34 +0100 |
commit | 5634751782676cbc7a679135dcc2a94bc246124c (patch) | |
tree | d395d3c1d27d626bf2a2b224b41008bee27e8e21 | |
parent | spec: Specify RTEMS_CONFIGURED_MINIMUM_STACK_SIZE (diff) | |
download | rtems-central-5634751782676cbc7a679135dcc2a94bc246124c.tar.bz2 |
spec: Specify rtems_build_name() function
-rw-r--r-- | spec/rtems/object/req/build-name.yml | 15 | ||||
-rw-r--r-- | spec/rtems/object/val/object.yml | 31 |
2 files changed, 43 insertions, 3 deletions
diff --git a/spec/rtems/object/req/build-name.yml b/spec/rtems/object/req/build-name.yml new file mode 100644 index 00000000..ab91d6a4 --- /dev/null +++ b/spec/rtems/object/req/build-name.yml @@ -0,0 +1,15 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: interface-function + uid: ../if/build-name +functional-type: function +rationale: null +references: [] +requirement-type: functional +text: | + When the ${../if/build-name:/name} directive is called, the directive shall + return the return value of a call to ${../if/build-name-macro:/name}. +type: requirement diff --git a/spec/rtems/object/val/object.yml b/spec/rtems/object/val/object.yml index a9e3dd6c..4fcfed64 100644 --- a/spec/rtems/object/val/object.yml +++ b/spec/rtems/object/val/object.yml @@ -5,7 +5,8 @@ enabled-by: true links: [] test-actions: - action-brief: | - Validate the results of rtems_build_name() for a sample set of parameters. + Validate the results of ${../if/build-name:/name} (function) and + ${../if/build-name-macro:/name} (macro) for a sample set of parameters. action-code: | static const uint16_t chars[] = { 0, 255, 257 }; rtems_name accumulated_name; @@ -52,13 +53,22 @@ test-actions: T_quiet_eq_u32( actual_name, expected_name ) accumulated_name += actual_name; - actual_name = rtems_build_name( + actual_name = BuildName( chars[ i ], chars[ j ], chars[ k ], chars[ r ] ); T_quiet_eq_u32( actual_name, expected_name ); + + actual_name = BuildNameMacro( + chars[ i ], + chars[ j ], + chars[ k ], + chars[ r ] + ); + T_quiet_eq_u32( actual_name, expected_name ); + accumulated_name += actual_name; } } @@ -71,9 +81,13 @@ test-actions: T_step_eq_u32( ${step}, accumulated_name, 0x51515100 ); links: - role: validation + uid: ../req/build-name + - role: validation uid: ../req/build-name-macro links: - role: validation + uid: ../req/build-name + - role: validation uid: ../req/build-name-macro - action-brief: | Validate the result of ${../if/get-local-node:/name}. @@ -101,7 +115,18 @@ test-includes: test-local-includes: [] test-setup: null test-stop: null -test-support: null +test-support: | + static rtems_name BuildNameMacro( char c1, char c2, char c3, char c4 ) + { + return rtems_build_name( c1, c2, c3, c4 ); + } + + #undef rtems_build_name + + static rtems_name BuildName( char c1, char c2, char c3, char c4 ) + { + return rtems_build_name( c1, c2, c3, c4 ); + } test-target: testsuites/validation/tc-object.c test-teardown: null type: test-case |