Skip to content

Commit 6e290b4

Browse files
committedJan 27, 2020
First commit
1 parent a7eb21c commit 6e290b4

File tree

8 files changed

+181
-14
lines changed

8 files changed

+181
-14
lines changed
 

‎LICENSE

+2-12
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,7 @@
175175

176176
END OF TERMS AND CONDITIONS
177177

178-
APPENDIX: How to apply the Apache License to your work.
179-
180-
To apply the Apache License to your work, attach the following
181-
boilerplate notice, with the fields enclosed by brackets "[]"
182-
replaced with your own identifying information. (Don't include
183-
the brackets!) The text should be enclosed in the appropriate
184-
comment syntax for the file format. We also recommend that a
185-
file or class name and description of purpose be included on the
186-
same "printed page" as the copyright notice for easier
187-
identification within third-party archives.
188-
189-
Copyright [yyyy] [name of copyright owner]
178+
Copyright 2020, Feng Lee <feng@emqx.io>.
190179

191180
Licensed under the Apache License, Version 2.0 (the "License");
192181
you may not use this file except in compliance with the License.
@@ -199,3 +188,4 @@
199188
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200189
See the License for the specific language governing permissions and
201190
limitations under the License.
191+

‎Makefile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
REBAR := rebar3
2+
3+
.PHONY: all
4+
all: compile
5+
6+
compile:
7+
$(REBAR) compile
8+
9+
.PHONY: clean
10+
clean: distclean
11+
12+
.PHONY: distclean
13+
distclean:
14+
@rm -rf _build erl_crash.dump rebar3.crashdump rebar.lock
15+
16+
.PHONY: xref
17+
xref:
18+
$(REBAR) xref
19+
20+
.PHONY: eunit
21+
eunit: compile
22+
$(REBAR) eunit verbose=truen
23+
24+
.PHONY: ct
25+
ct: compile
26+
$(REBAR) as test ct -v
27+
28+
cover:
29+
$(REBAR) cover
30+
31+
.PHONY: dialyzer
32+
dialyzer:
33+
$(REBAR) dialyzer
34+

‎README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
# quic
2-
Erlang implementation of QUIC Protocol
1+
quic
2+
=====
3+
4+
An OTP library
5+
6+
Build
7+
-----
8+
9+
$ rebar3 compile

‎rebar.config

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{erl_opts, [debug_info]}.
2+
3+
{deps, []}.

‎rebar.lock

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[].

‎src/quic.app.src

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{application, quic,
2+
[{description, "An OTP library"},
3+
{vsn, "0.1.0"},
4+
{registered, []},
5+
{applications,
6+
[kernel,
7+
stdlib
8+
]},
9+
{env,[]},
10+
{modules, []},
11+
12+
{licenses, ["Apache 2.0"]},
13+
{links, []}
14+
]}.

‎src/quic.erl

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
%%--------------------------------------------------------------------
2+
%% Copyright (c) 2020 EMQ Technologies Co., Ltd. All Rights Reserved.
3+
%%
4+
%% Licensed under the Apache License, Version 2.0 (the "License");
5+
%% you may not use this file except in compliance with the License.
6+
%% You may obtain a copy of the License at
7+
%%
8+
%% http://www.apache.org/licenses/LICENSE-2.0
9+
%%
10+
%% Unless required by applicable law or agreed to in writing, software
11+
%% distributed under the License is distributed on an "AS IS" BASIS,
12+
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
%% See the License for the specific language governing permissions and
14+
%% limitations under the License.
15+
%%--------------------------------------------------------------------
16+
17+
-module(quic).
18+
19+
-export([]).
20+

‎test/quic_SUITE.erl

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
%%--------------------------------------------------------------------
2+
%% Copyright (c) 2020 EMQ Technologies Co., Ltd. All Rights Reserved.
3+
%%
4+
%% Licensed under the Apache License, Version 2.0 (the "License");
5+
%% you may not use this file except in compliance with the License.
6+
%% You may obtain a copy of the License at
7+
%%
8+
%% http://www.apache.org/licenses/LICENSE-2.0
9+
%%
10+
%% Unless required by applicable law or agreed to in writing, software
11+
%% distributed under the License is distributed on an "AS IS" BASIS,
12+
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
%% See the License for the specific language governing permissions and
14+
%% limitations under the License.
15+
%%--------------------------------------------------------------------
16+
17+
-module(quic_SUITE).
18+
19+
%% API
20+
-export([all/0,
21+
suite/0,
22+
groups/0,
23+
init_per_suite/1,
24+
end_per_suite/1,
25+
group/1,
26+
init_per_group/2,
27+
end_per_group/2,
28+
init_per_testcase/2,
29+
end_per_testcase/2]).
30+
31+
%% test cases
32+
-export([
33+
%% TODO: test case names go here
34+
]).
35+
36+
-include_lib("proper/include/proper.hrl").
37+
-include_lib("common_test/include/ct.hrl").
38+
39+
-define(PROPTEST(M,F), true = proper:quickcheck(M:F())).
40+
41+
all() ->
42+
[
43+
%% TODO: Group names here e.g. {group, crud}
44+
].
45+
46+
suite() ->
47+
[{ct_hooks,[cth_surefire]}, {timetrap, {seconds, 30}}].
48+
49+
groups() ->
50+
[
51+
%% TODO: group definitions here e.g.
52+
%% {crud, [], [
53+
%% t_create_resource,
54+
%% t_read_resource,
55+
%% t_update_resource,
56+
%% t_delete_resource
57+
%% ]}
58+
59+
].
60+
61+
%%%===================================================================
62+
%%% Overall setup/teardown
63+
%%%===================================================================
64+
init_per_suite(Config) ->
65+
Config.
66+
67+
end_per_suite(_Config) ->
68+
ok.
69+
70+
71+
%%%===================================================================
72+
%%% Group specific setup/teardown
73+
%%%===================================================================
74+
group(_Groupname) ->
75+
[].
76+
77+
init_per_group(_Groupname, Config) ->
78+
Config.
79+
80+
end_per_group(_Groupname, _Config) ->
81+
82+
ok.
83+
84+
85+
%%%===================================================================
86+
%%% Testcase specific setup/teardown
87+
%%%===================================================================
88+
init_per_testcase(_TestCase, Config) ->
89+
Config.
90+
91+
end_per_testcase(_TestCase, _Config) ->
92+
ok.
93+
94+
%%%===================================================================
95+
%%% Individual Test Cases (from groups() definition)
96+
%%%===================================================================
97+
98+

0 commit comments

Comments
 (0)
Please sign in to comment.