Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of libdom test suite.
  3.  * Licensed under the MIT License,
  4.  *                http://www.opensource.org/licenses/mit-license.php
  5.  * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
  6.  */
  7.  
  8. #ifndef domtscondition_h_
  9. #define domtscondition_h_
  10.  
  11. #include <stdbool.h>
  12.  
  13. /**
  14.  * Just simple functions which meet the needs of DOMTS conditions
  15.  */
  16.  
  17. static inline bool less(int excepted, int actual)
  18. {
  19.         return actual < excepted;
  20. }
  21.  
  22. static inline bool less_or_equals(int excepted, int actual)
  23. {
  24.         return actual <= excepted;
  25. }
  26.  
  27. static inline bool greater(int excepted, int actual)
  28. {
  29.         return actual > excepted;
  30. }
  31.  
  32. static inline bool greater_or_equals(int excepted, int actual)
  33. {
  34.         return actual >= excepted;
  35. }
  36.  
  37. #endif
  38.