anchor.diff:  %% Piece indexes can never be less than zero
   negative_index_test() ->
       ?assertError(badarg, ?set:is_member(-1, undefined)).
  +
  +%% Piece indexes that fall outside of the index range should fail
  +too_high_member_test() ->
  +    Set = ?set:new(8),
  +    ?assertError(badarg, ?set:is_member(8, Set)).
   
   %%
   %% Modifying the contents of a pieceset
  
positive.code: padding_test() ->
      Set = ?set:from_binary(<<0:8, 0:6, 1:1, 0:1>>, 15),
      ?assert(?set:is_member(14, Set)),
      ?assert(not ?set:is_member(15, Set)).
  
  %% If the padding is invalid, the conversion from
  %% bitfield to pieceset should crash.
  
negative.code:     size :: pos_integer(),
      elements :: pos_integer()}).
  
  %% @doc
  %% Create an empty set of piece indexes. The set of pieces
  %% is limited to contain pieces indexes from 0 to Size-1.
  %% @end
  new(Size) ->
      #pieceset{size=Size, elements=0}.
  
  %% @doc
  %% Create a piece set based on a bitfield. The bitfield is
  %% expected to contain at most Size pieces. The piece set
  %% returned by this function is limited to contain at most
  %% Size pieces, as a set returned from new/1 is.
  %% The bitfield is expected to not be padded with more than 7 bits.
  %% @end
  from_binary(Bin, Size) when is_binary(Bin) ->
      PaddingLen = paddinglen(Size),
      <<Elements:Size, PaddingValue:PaddingLen>> = Bin,
  