is_queue/1, -ifdef(TEST).

This commit is contained in:
Feng 2016-02-13 18:34:28 +08:00
parent 569e8c3ec5
commit 890de0c60a
1 changed files with 6 additions and 1 deletions

View File

@ -14,7 +14,6 @@
%% limitations under the License.
%%--------------------------------------------------------------------
%% @doc MQTT Topic Functions
-module(emqttd_topic).
-import(lists, [reverse/1]).
@ -23,6 +22,10 @@
-export([join/1, feed_var/3, is_queue/1, systop/1]).
-ifdef(TEST).
-compile(export_all).
-endif.
-type topic() :: binary().
-type word() :: '' | '+' | '#' | binary().
@ -144,6 +147,8 @@ word(Bin) -> Bin.
-spec is_queue(topic()) -> boolean().
is_queue(<<"$Q/", _Queue/binary>>) ->
true;
is_queue(<<"$q/", _Queue/binary>>) ->
true;
is_queue(_) ->
false.