Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
Add test showing nested cuts in records work as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Sackman committed May 9, 2011
1 parent 8f4a44f commit 64f5200
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/src/test_cut.erl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ test_cut_record() ->
hamster = Getter(Setter2(R, hamster)),
passed.

test_cut_record_nested() ->
F = #r{f1 = #r{f1 = _, f3 = _}, f2 = _},
R = F(apple),
F1 = R#r.f1,
#r{f1 = orange, f3 = banana} = F1(orange, banana),
passed.

test_cut_binary() ->
<<"AbA", _/binary>> = (<<65, _, 65>>)($b),
F = <<_:_>>,
Expand Down Expand Up @@ -126,6 +133,7 @@ test() ->
test_cut_unary_op(),
test_cut_tuple(),
test_cut_record(),
test_cut_record_nested(),
test_cut_binary(),
test_cut_list(),
test_cut_case(),
Expand Down

0 comments on commit 64f5200

Please sign in to comment.