message: [lang] Add (failing) json tests for tuples and arrays
diff: @@ -353,7 +353,7 @@ mod tests {
  }
  #[test]
  - fn basic_tuple() {
  + fn tuple_basic() {
  assert_eq_type_description(
  parse_quote!( (bool, i32) ),
  Tuple(TupleTypeDescription {
  @@ -366,7 +366,7 @@ mod tests {
  }
  #[test]
  - fn nested_tuple() {
  + fn tuple_nested() {
  assert_eq_type_description(
  parse_quote!( (u32, (bool, i32)) ),
  Tuple(TupleTypeDescription {
  @@ -384,7 +384,7 @@ mod tests {
  }
  #[test]
  - fn basic_array() {
  + fn array_basic() {
  assert_eq_type_description(
  parse_quote!( [u32; 5] ),
  Array(ArrayTypeDescription {
  @@ -395,7 +395,7 @@ mod tests {
  }
  #[test]
  - fn nested_array() {
  + fn array_nested() {
  assert_eq_type_description(
  parse_quote!( [[u32; 5]; 3] ),
  Array(ArrayTypeDescription {
  @@ -407,5 +407,22 @@ mod tests {
  })
  )
  }
  +
  + // todo: [AJ] make these json tests pass with serde customisation
  + #[test]
  + fn tuple_json() {
  + let ty: syn::Type = parse_quote!( (u64, i32) );
  + let td = TypeDescription::try_from(&ty).unwrap();
  + let json = serde_json::to_string(&td).unwrap();
  + assert_eq!("[\"u64\", \"i32\"]", json);
  + }
  +
  + #[test]
  + fn array_json() {
  + let ty: syn::Type = parse_quote!( [u32; 5] );
  + let td = TypeDescription::try_from(&ty).unwrap();
  + let json = serde_json::to_string(&td).unwrap();
  + assert_eq!("{inner: \"u32\", arity: 5}", json);
  + }
  }
  