• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include make/util.mk
2
3streq_t0 = $(call streq,,)
4$(call AssertEqual,streq_t0,true)
5streq_t1 = $(call streq,b,)
6$(call AssertEqual,streq_t1,)
7streq_t2 = $(call streq,,b)
8$(call AssertEqual,streq_t2,)
9streq_t3 = $(call streq,b,b)
10$(call AssertEqual,streq_t3,true)
11streq_t4 = $(call streq,bb,b)
12$(call AssertEqual,streq_t4,)
13streq_t5 = $(call streq,b,bb)
14$(call AssertEqual,streq_t5,)
15streq_t6 = $(call streq,bb,bb)
16$(call AssertEqual,streq_t6,true)
17
18strneq_t7 = $(call strneq,,)
19$(call AssertEqual,strneq_t7,)
20strneq_t8 = $(call strneq,b,)
21$(call AssertEqual,strneq_t8,true)
22strneq_t9 = $(call strneq,,b)
23$(call AssertEqual,strneq_t9,true)
24strneq_t10 = $(call strneq,b,b)
25$(call AssertEqual,strneq_t10,)
26strneq_t11 = $(call strneq,bb,b)
27$(call AssertEqual,strneq_t11,true)
28strneq_t12 = $(call strneq,b,bb)
29$(call AssertEqual,strneq_t12,true)
30strneq_t13 = $(call strneq,bb,bb)
31$(call AssertEqual,strneq_t13,)
32
33contains_t0 = $(call contains,a b b c,a)
34$(call AssertEqual,contains_t0,true)
35contains_t1 = $(call contains,a b b c,b)
36$(call AssertEqual,contains_t1,true)
37contains_t2 = $(call contains,a b b c,c)
38$(call AssertEqual,contains_t2,true)
39contains_t3 = $(call contains,a b b c,d)
40$(call AssertEqual,contains_t3,)
41
42isdefined_t0_defined_var := 0
43isdefined_t0 = $(call IsDefined,isdefined_t0_defined_var)
44$(call AssertEqual,isdefined_t0,true)
45isdefined_t1 = $(call IsDefined,isdefined_t1_never_defined_var)
46$(call AssertEqual,isdefined_t1,)
47
48varordefault_t0_var := 1
49varordefault_t0 = $(call VarOrDefault,varordefault_t0_var.opt,$(varordefault_t0_var))
50$(call AssertEqual,varordefault_t0,1)
51varordefault_t1_var := 1
52varordefault_t1_var.opt := 2
53varordefault_t1 = $(call VarOrDefault,varordefault_t1_var.opt,$(varordefault_t1_var))
54$(call AssertEqual,varordefault_t1,2)
55
56$(call CopyVariable,copyvariable_t0_src,copyvariable_t0_dst)
57copyvariable_t0 = $(call IsUndefined,copyvariable_t0_dst)
58$(call AssertEqual,copyvariable_t0,true)
59copyvariable_t1_src = 1
60$(call CopyVariable,copyvariable_t1_src,copyvariable_t1)
61$(call AssertEqual,copyvariable_t1,1)
62
63all:
64	@true
65.PHONY: all
66
67