-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathep_issue_11_tests.erl
23 lines (20 loc) · 1.01 KB
/
ep_issue_11_tests.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-module(ep_issue_11_tests).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("gpb/include/gpb.hrl").
% https://github.com/jinganix/enif_protobuf/issues/11
issue_11_test() ->
Defs = [
{{msg, pro_180_items_list}, [
#field{name = id, fnum = 1, rnum = 2, type = uint32, occurrence = defaulty, opts = []},
#field{name = num, fnum = 2, rnum = 3, type = uint32, occurrence = defaulty, opts = []},
#field{name = text, fnum = 3, rnum = 4, type = string, occurrence = defaulty, opts = []}
]},
{{msg, pro_180_all_prop}, [
#field{name = key, fnum = 1, rnum = 2, type = uint32, occurrence = defaulty, opts = []},
#field{name = value, fnum = 2, rnum = 3, type = uint32, occurrence = defaulty, opts = []},
#field{name = incval, fnum = 3, rnum = 4, type = uint32, occurrence = defaulty, opts = []}
]},
{proto3_msgs, [pro_180_all_prop, pro_180_items_list]}
],
ok = enif_protobuf:load_cache(Defs).