Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 679f30428f
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (17 sloc) 0.668 kb
#!/usr/bin/env escript
%% -*- erlang -*-
%%! -pa ../src -sasl errlog_type error -boot start_sasl -noshell
-record(location, {region, country}).
-record(person, {name, address, phone_number, age, location}).
main(_) ->
etap:plan(2),
etap:is(protobuffs_compile:scan_file("hasdefault.proto"), ok, "hasdefault.proto created"),
case catch hasdefault_pb:encode_person(#person{}) of
{'EXIT', {error, {required_field_is_undefined,1,string}}} ->
etap:ok(true, "Required field is undefined");
_ ->
etap:ok(false, "Required field is undefined")
end,
ok = file:delete("hasdefault_pb.hrl"),
ok = file:delete("hasdefault_pb.beam"),
etap:end_tests().
Jump to Line
Something went wrong with that request. Please try again.