anchor.diff:  
   -spec seeder(boolean(), peerstate()) -> peerstate().
   seeder(Status, Peerstate) ->
  -    #peerstate{seeder=Current} = Peerstate,
       Status orelse erlang:error(badarg),
       Peerstate#peerstate{seeder=Status}.
   
  
positive.code:     [?_assert(?state:choked(State)),
       ?_assertNot(?state:interested(State)),
       ?_assertNot(?state:seeder(State)),
       ?_assertError(badarg, ?state:pieces(State)),
       ?_assertError(badarg, ?state:interesting(0, State))].
  
  
negative.code:      ?_assertNot(?state:seeding(?state:hasnone(S0))),
       ?_assertNot(?state:seeding(?state:hasone(0, S0)))].
  
  needreq_test_() ->
      S0 = ?state:hasnone(?state:new(testsize())),
      S1 = ?state:interested(true, S0),
      S2 = ?state:choked(false, S0),
      S3 = ?state:interested(true, ?state:choked(false, S0)),
      [?_assertNot(?state:needreqs(S0)),
       ?_assertNot(?state:needreqs(S1)),
       ?_assertNot(?state:needreqs(S2)),
       ?_assert(?state:needreqs(S3))].
  
  request_update_test() ->
      S0 = ?state:hasnone(?state:new(testsize())),
      Reqs = ?state:requests(S0),
      NewReqs = ?rqueue:push(0, 0, 1, Reqs),
      S1 = ?state:requests(NewReqs, S0),
      ?assertEqual(NewReqs, ?state:requests(S1)).
  
  -endif.
  
  