message: Validate input length in MockApi.human_address
diff: @@ -83,6 +83,10 @@ impl Api for MockApi {
  }
  fn human_address(&self, canonical: &CanonicalAddr) -> StdResult<HumanAddr> {
  + if canonical.len() != self.canonical_length {
  + return contract_err("Invalid input: canonical address length not correct");
  + }
  +
  // remove trailing 0's (TODO: fix this - but fine for first tests)
  let trimmed: Vec<u8> = canonical
  .as_slice()
  @@ -203,6 +207,14 @@ mod test {
  assert_eq!(human, recovered);
  }
  + #[test]
  + #[should_panic(expected = "length not correct")]
  + fn human_address_input_length() {
  + let api = MockApi::new(10);
  + let input = CanonicalAddr(Binary(vec![61; 11]));
  + api.human_address(&input).unwrap();
  + }
  +
  #[test]
  #[should_panic(expected = "address too short")]
  fn canonical_address_min_input_length() {
  