Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

86 righe
3.7 KiB

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <limits.h>
  4. #define TMin INT_MIN
  5. #define TMax INT_MAX
  6. #include "btest.h"
  7. #include "bits.h"
  8. test_rec test_set[] = {
  9. /* Copyright (C) 1991-2020 Free Software Foundation, Inc.
  10. This file is part of the GNU C Library.
  11. The GNU C Library is free software; you can redistribute it and/or
  12. modify it under the terms of the GNU Lesser General Public
  13. License as published by the Free Software Foundation; either
  14. version 2.1 of the License, or (at your option) any later version.
  15. The GNU C Library is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. Lesser General Public License for more details.
  19. You should have received a copy of the GNU Lesser General Public
  20. License along with the GNU C Library; if not, see
  21. <https://www.gnu.org/licenses/>. */
  22. /* This header is separate from features.h so that the compiler can
  23. include it implicitly at the start of every compilation. It must
  24. not itself include <features.h> or any other header that includes
  25. <features.h> because the implicit include comes before any feature
  26. test macros that may be defined in a source file before it first
  27. explicitly includes a system header. GCC knows the name of this
  28. header in order to preinclude it. */
  29. /* glibc's intent is to support the IEC 559 math functionality, real
  30. and complex. If the GCC (4.9 and later) predefined macros
  31. specifying compiler intent are available, use them to determine
  32. whether the overall intent is to support these features; otherwise,
  33. presume an older compiler has intent to support these features and
  34. define these macros by default. */
  35. /* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is
  36. synchronized with ISO/IEC 10646:2017, fifth edition, plus
  37. the following additions from Amendment 1 to the fifth edition:
  38. - 56 emoji characters
  39. - 285 hentaigana
  40. - 3 additional Zanabazar Square characters */
  41. //1
  42. {"bitXor", (funct_t) bitXor, (funct_t) test_bitXor, 2, "& ~", 14, 1,
  43. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  44. {"tmin", (funct_t) tmin, (funct_t) test_tmin, 0, "! ~ & ^ | + << >>", 4, 1,
  45. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  46. //2
  47. {"isTmax", (funct_t) isTmax, (funct_t) test_isTmax, 1, "! ~ & ^ | +", 10, 1,
  48. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  49. {"allOddBits", (funct_t) allOddBits, (funct_t) test_allOddBits, 1,
  50. "! ~ & ^ | + << >>", 12, 2,
  51. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  52. {"negate", (funct_t) negate, (funct_t) test_negate, 1,
  53. "! ~ & ^ | + << >>", 5, 2,
  54. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  55. //3
  56. {"isAsciiDigit", (funct_t) isAsciiDigit, (funct_t) test_isAsciiDigit, 1,
  57. "! ~ & ^ | + << >>", 15, 3,
  58. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  59. {"conditional", (funct_t) conditional, (funct_t) test_conditional, 3, "! ~ & ^ | << >>", 16, 3,
  60. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  61. {"isLessOrEqual", (funct_t) isLessOrEqual, (funct_t) test_isLessOrEqual, 2,
  62. "! ~ & ^ | + << >>", 24, 3,
  63. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  64. //4
  65. {"logicalNeg", (funct_t) logicalNeg, (funct_t) test_logicalNeg, 1,
  66. "~ & ^ | + << >>", 12, 4,
  67. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  68. {"howManyBits", (funct_t) howManyBits, (funct_t) test_howManyBits, 1, "! ~ & ^ | + << >>", 90, 4,
  69. {{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
  70. //float
  71. {"floatScale2", (funct_t) floatScale2, (funct_t) test_floatScale2, 1,
  72. "$", 30, 4,
  73. {{1, 1},{1,1},{1,1}}},
  74. {"floatFloat2Int", (funct_t) floatFloat2Int, (funct_t) test_floatFloat2Int, 1,
  75. "$", 30, 4,
  76. {{1, 1},{1,1},{1,1}}},
  77. // #include "floatPower2.c"
  78. {"", NULL, NULL, 0, "", 0, 0,
  79. {{0, 0},{0,0},{0,0}}}
  80. };