Lines Matching refs:call
29 math-error = $(call pretty-error,$(1))
50 math-expect-true = $(call math-expect,$(1),true)
51 math-expect-false = $(call math-expect,$(1),)
66 $(if $(1),,$(call math-error,Argument missing)) \
67 $(if $(word 2,$(1)),$(call math-error,Multiple words in a single argument: $(1))) \
73 $(if $(word 2,$(1)),$(call math-error,Multiple words in a single argument: $(1))) \
77 $(call math-expect-true,(call math_is_number,0))
78 $(call math-expect-true,(call math_is_number,2))
79 $(call math-expect-false,(call math_is_number,foo))
80 $(call math-expect-false,(call math_is_number,-1))
81 $(call math-expect-error,(call math_is_number,1 2),Multiple words in a single argument: 1 2)
82 $(call math-expect-error,(call math_is_number,no 2),Multiple words in a single argument: no 2)
84 $(call math-expect-true,(call math_is_zero,0))
85 $(call math-expect-false,(call math_is_zero,1))
86 $(call math-expect-false,(call math_is_zero,foo))
87 $(call math-expect-error,(call math_is_zero,1 2),Multiple words in a single argument: 1 2)
88 $(call math-expect-error,(call math_is_zero,no 2),Multiple words in a single argument: no 2)
91 $(if $(call math_is_number,$(1)),,$(call math-error,Only non-negative integers <= 100 are supported…
94 $(call math-expect,(call _math_check_valid,0))
95 $(call math-expect,(call _math_check_valid,1))
96 $(call math-expect,(call _math_check_valid,100))
97 $(call math-expect-error,(call _math_check_valid,-1),Only non-negative integers <= 100 are supporte…
98 $(call math-expect-error,(call _math_check_valid,101),Only non-negative integers <= 100 are support…
99 $(call math-expect-error,(call _math_check_valid,),Argument missing)
100 $(call math-expect-error,(call _math_check_valid,1 2),Multiple words in a single argument: 1 2)
105 $(call _math_check_valid,$(1))$(call _math_check_valid,$(2)) \
106 $(if $(call math_is_zero,$(1)),0)\
107 $(wordlist $(if $(call math_is_zero,$(1)),1,$(1)),$(2),$(__MATH_POS_NUMBERS)))
110 $(call math-expect,(call int_range_list,0,1),0 1)
111 $(call math-expect,(call int_range_list,1,1),1)
112 $(call math-expect,(call int_range_list,1,2),1 2)
113 $(call math-expect,(call int_range_list,2,1),)
114 $(call math-expect-error,(call int_range_list,1,101),Only non-negative integers <= 100 are supporte…
120 $(strip $(call _math_check_valid,$(1)) $(call _math_check_valid,$(2)) \
124 $(call math-expect-error,(call math_max),Argument missing)
125 $(call math-expect-error,(call math_max,1),Argument missing)
126 $(call math-expect-error,(call math_max,1 2,3),Multiple words in a single argument: 1 2)
127 $(call math-expect,(call math_max,0,1),1)
128 $(call math-expect,(call math_max,1,0),1)
129 $(call math-expect,(call math_max,1,1),1)
130 $(call math-expect,(call math_max,5,42),42)
131 $(call math-expect,(call math_max,42,5),42)
134 $(if $(filter $(1),$(call math_max,$(1),$(2))),true)
138 $(if $(call math_gt_or_eq,$(2),$(1)),,true)
142 $(if $(call math_gt_or_eq,$(1),$(2)),,true)
145 $(call math-expect-true,(call math_gt_or_eq, 2, 1))
146 $(call math-expect-true,(call math_gt_or_eq, 1, 1))
147 $(call math-expect-false,(call math_gt_or_eq, 1, 2))
148 $(call math-expect-true,(call math_gt, 4, 3))
149 $(call math-expect-false,(call math_gt, 5, 5))
150 $(call math-expect-false,(call math_gt, 6, 7))
151 $(call math-expect-false,(call math_lt, 1, 0))
152 $(call math-expect-false,(call math_lt, 8, 8))
153 $(call math-expect-true,(call math_lt, 10, 11))
162 $(call math-expect,(call inc_and_print,a),1)
163 $(call math-expect,(call inc_and_print,a),2)
164 $(call math-expect,(call inc_and_print,a),3)
165 $(call math-expect,(call inc_and_print,a),4)
172 $(if $(call math_is_number,$(n)), \
173 $(if $(call math_lt,$(n),$(1)), \
177 $(call math-expect,(call numbers_less_than,0,0 1 2 3),)
178 $(call math-expect,(call numbers_less_than,1,0 2 1 3),0)
179 $(call math-expect,(call numbers_less_than,2,0 2 1 3),0 1)
180 $(call math-expect,(call numbers_less_than,3,0 2 1 3),0 2 1)
181 $(call math-expect,(call numbers_less_than,4,0 2 1 3),0 2 1 3)
182 $(call math-expect,(call numbers_less_than,3,0 2 1 3 2),0 2 1 2)
189 $(call math-error,integer greater than $(words $(_INT_LIMIT_WORDS)) is not supported!),\
204 $(filter-out $(words $(2)),$(words $(call _int_max,$(1),$(2))))
218 $(call _int_greater-than,$(1),$(2))$(call _int_equal,$(1),$(2))
222 $(words $(call _int_encode,$(1)) $(call _int_encode,$(2)))
225 $(call math-expect,(call int_plus,0,0),0)
226 $(call math-expect,(call int_plus,0,1),1)
227 $(call math-expect,(call int_plus,1,0),1)
228 $(call math-expect,(call int_plus,1,100),101)
229 $(call math-expect,(call int_plus,100,100),200)
233 $(if $(call _int_greater-or-equal,$(call _int_encode,$(1)),$(call _int_encode,$(2))),\
234 $(words $(filter-out xx,$(join $(call _int_encode,$(1)),$(call _int_encode,$(2))))),\
235 $(call math-error,subtract underflow $(1) - $(2))))
238 $(call math-expect,(call int_subtract,0,0),0)
239 $(call math-expect,(call int_subtract,1,0),1)
240 $(call math-expect,(call int_subtract,1,1),0)
241 $(call math-expect,(call int_subtract,100,1),99)
242 $(call math-expect,(call int_subtract,200,100),100)
243 $(call math-expect-error,(call int_subtract,0,1),subtract underflow 0 - 1)
246 $(words $(foreach a,$(call _int_encode,$(1)),$(call _int_encode,$(2))))
249 $(call math-expect,(call int_multiply,0,0),0)
250 $(call math-expect,(call int_multiply,1,0),0)
251 $(call math-expect,(call int_multiply,1,1),1)
252 $(call math-expect,(call int_multiply,100,1),100)
253 $(call math-expect,(call int_multiply,1,100),100)
254 $(call math-expect,(call int_multiply,4,100),400)
255 $(call math-expect,(call int_multiply,100,4),400)
258 $(if $(filter 0,$(2)),$(call math-error,division by zero is not allowed!),$(strip \
259 $(if $(call _int_greater-or-equal,$(call _int_encode,$(1)),$(call _int_encode,$(2))), \
260 $(call int_plus,$(call int_divide,$(call int_subtract,$(1),$(2)),$(2)),1),0)))
263 $(call math-expect,(call int_divide,1,1),1)
264 $(call math-expect,(call int_divide,200,1),200)
265 $(call math-expect,(call int_divide,200,3),66)
266 $(call math-expect,(call int_divide,1,2),0)
267 $(call math-expect-error,(call int_divide,0,0),division by zero is not allowed!)
268 $(call math-expect-error,(call int_divide,1,0),division by zero is not allowed!)