Не могли бы вы дать несколько советов о том, как написать структурированные, тестируемые требования к программному API (функциям)?
Например, давайте рассмотрим следующую документацию:
_Unwind_Reason _Unwind_RaiseException( struct _Unwind_Exception *exception_object );
Raise an exception, passing along the given exception object, which should have its exception_class and exception_cleanup fields set. The exception object has been allocated by the language-specific runtime, and has a language-specific format, except that it must contain an _Unwind_Exception struct (see Exception Header above). _Unwind_RaiseException does not return, unless an error condition is found (such as no handler for the exception, bad stack format, etc.). In such a case, an _Unwind_Reason_Code value is returned. Possibilities are:
- _URC_END_OF_STACK: The unwinder encountered the end of the stack during phase 1, without finding a handler. The unwind runtime will not have modified the stack. The C++ runtime will normally call uncaught_exception() in this case.
- _URC_FATAL_PHASE1_ERROR: The unwinder encountered an unexpected error during phase 1, e.g. stack corruption. The unwind runtime will not have modified the stack. The C++ runtime will normally call terminate() in this case.
If the unwinder encounters an unexpected error during phase 2, it should return _URC_FATAL_PHASE2_ERROR to its caller.
Этоэто документацияОн должен быть переведен в набор (иерархический список?) Требований, и каждое требование должно иметь свой уникальный идентификатор и должно быть четко проверяемым.
Буду очень признателен за ваш совет!