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