anchor.diff:      expect(previewInfo.applyTo(code), 'f(a, b, c) => a ? b : c..d;');
     }
   
  -  void test_removeAs_in_cascade_target_parens_needed_assignment() async {
  +  Future<void>
  +      test_removeAs_in_cascade_target_parens_needed_assignment() async {
       await analyze('f(a, b) => ((a = b) as dynamic)..c;');
       var assignment = findNode.assignment('a = b');
       var cast = assignment.parent.parent;
  
positive.code:     expect(previewInfo.applyTo(code), 'f(a) => (throw a)..b;');
    }
  
    void test_removeAs_lower_precedence_do_not_remove_inner_parens() async {
      await analyze('f(a, b, c) => (a == b) as Null == c;');
      var expr = findNode.binary('a == b');
      var previewInfo = run({expr.parent.parent: const RemoveAs()});
      expect(previewInfo.applyTo(code), 'f(a, b, c) => (a == b) == c;');
    }
  
    void test_removeAs_lower_precedence_remove_inner_parens() async {
      await analyze('f(a, b) => (a == b) as Null;');
      var expr = findNode.binary('a == b');
      var previewInfo = run({expr.parent.parent: const RemoveAs()});
      expect(previewInfo.applyTo(code), 'f(a, b) => a == b;');
    }
  
    void test_removeAs_parens_needed_due_to_cascade() async {
      // Note: spaces around parens to verify that we don't remove the old parens
      // and create new ones.
      await analyze('f(a, c) => a..b = throw ( c..d ) as int;');
  
negative.code:     expect(previewInfo.applyTo(code), 'f(a) => a..b..c;');
    }
  
    Future<void>
        test_removeAs_in_cascade_target_no_parens_needed_conditional() async {
      // TODO(paulberry): would it be better to keep the parens in this case for
      // clarity, even though they're not needed?
      await analyze('f(a, b, c) => ((a ? b : c) as dynamic)..d;');
  