Jelajahi Sumber

fix(assert): use unpredictable binding names in macros

Also translate macro vars to ALLCAPS for consistency.
Andrew Mayorov 2 tahun lalu
induk
melakukan
6f8f21106b
1 mengubah file dengan 5 tambahan dan 5 penghapusan
  1. 5 5
      apps/emqx/include/asserts.hrl

+ 5 - 5
apps/emqx/include/asserts.hrl

@@ -30,16 +30,16 @@
     )
 ).
 
--define(assertInclude(Pattern, List),
+-define(assertInclude(PATTERN, LIST),
     ?assert(
         lists:any(
-            fun(El) ->
-                case El of
-                    Pattern -> true;
+            fun(X__Elem_) ->
+                case X__Elem_ of
+                    PATTERN -> true;
                     _ -> false
                 end
             end,
-            List
+            LIST
         )
     )
 ).