testable.h 601 B

123456789101112131415161718
  1. /* testable.h: Implementation of a testable component.
  2. This example code is in the Public Domain (or CC0 licensed, at your option.)
  3. Unless required by applicable law or agreed to in writing, this
  4. software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  5. CONDITIONS OF ANY KIND, either express or implied.
  6. */
  7. #pragma once
  8. /**
  9. * @brief Calculate arithmetic mean of integer values
  10. * @param values array of values
  11. * @param count number of elements in the array
  12. * @return arithmetic mean of values, or zero count is zero
  13. */
  14. int testable_mean(const int* values, int count);