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)
188 $(if $(call math_is_number,$(n)), \
189 $(if $(call math_gt_or_eq,$(n),$(1)), \
193 $(call math-expect,(call numbers_greater_or_equal_to,4,0 1 2 3),)
194 $(call math-expect,(call numbers_greater_or_equal_to,3,0 2 1 3),3)
195 $(call math-expect,(call numbers_greater_or_equal_to,2,0 2 1 3),2 3)
196 $(call math-expect,(call numbers_greater_or_equal_to,1,0 2 1 3),2 1 3)
197 $(call math-expect,(call numbers_greater_or_equal_to,0,0 2 1 3),0 2 1 3)
198 $(call math-expect,(call numbers_greater_or_equal_to,1,0 2 1 3 2),2 1 3 2)
205 $(call math-error,integer greater than $(words $(_INT_LIMIT_WORDS)) is not supported!),\
220 $(filter-out $(words $(2)),$(words $(call _int_max,$(1),$(2))))
234 $(call _int_greater-than,$(1),$(2))$(call _int_equal,$(1),$(2))
238 $(words $(call _int_encode,$(1)) $(call _int_encode,$(2)))
241 $(call math-expect,(call int_plus,0,0),0)
242 $(call math-expect,(call int_plus,0,1),1)
243 $(call math-expect,(call int_plus,1,0),1)
244 $(call math-expect,(call int_plus,1,100),101)
245 $(call math-expect,(call int_plus,100,100),200)
249 $(if $(call _int_greater-or-equal,$(call _int_encode,$(1)),$(call _int_encode,$(2))),\
250 $(words $(filter-out xx,$(join $(call _int_encode,$(1)),$(call _int_encode,$(2))))),\
251 $(call math-error,subtract underflow $(1) - $(2))))
254 $(call math-expect,(call int_subtract,0,0),0)
255 $(call math-expect,(call int_subtract,1,0),1)
256 $(call math-expect,(call int_subtract,1,1),0)
257 $(call math-expect,(call int_subtract,100,1),99)
258 $(call math-expect,(call int_subtract,200,100),100)
259 $(call math-expect-error,(call int_subtract,0,1),subtract underflow 0 - 1)
262 $(words $(foreach a,$(call _int_encode,$(1)),$(call _int_encode,$(2))))
265 $(call math-expect,(call int_multiply,0,0),0)
266 $(call math-expect,(call int_multiply,1,0),0)
267 $(call math-expect,(call int_multiply,1,1),1)
268 $(call math-expect,(call int_multiply,100,1),100)
269 $(call math-expect,(call int_multiply,1,100),100)
270 $(call math-expect,(call int_multiply,4,100),400)
271 $(call math-expect,(call int_multiply,100,4),400)
274 $(if $(filter 0,$(2)),$(call math-error,division by zero is not allowed!),$(strip \
275 $(if $(call _int_greater-or-equal,$(call _int_encode,$(1)),$(call _int_encode,$(2))), \
276 $(call int_plus,$(call int_divide,$(call int_subtract,$(1),$(2)),$(2)),1),0)))
279 $(call math-expect,(call int_divide,1,1),1)
280 $(call math-expect,(call int_divide,200,1),200)
281 $(call math-expect,(call int_divide,200,3),66)
282 $(call math-expect,(call int_divide,1,2),0)
283 $(call math-expect-error,(call int_divide,0,0),division by zero is not allowed!)
284 $(call math-expect-error,(call int_divide,1,0),division by zero is not allowed!)