@@ -98,19 +98,19 @@ void main() {
9898
9999 test ('path must be non-empty strings' , () {
100100 DocumentReference docRef = firestore.doc ('foo/bar' );
101- expect (() => firestore.collection ('' ), throwsAssertionError );
102- expect (() => docRef.collection ('' ), throwsAssertionError );
101+ expect (() => firestore.collection ('' ), throwsArgumentError );
102+ expect (() => docRef.collection ('' ), throwsArgumentError );
103103 });
104104
105105 test ('path must be odd length' , () {
106106 DocumentReference docRef = firestore.doc ('foo/bar' );
107- expect (() => firestore.collection ('foo/bar' ), throwsAssertionError );
107+ expect (() => firestore.collection ('foo/bar' ), throwsArgumentError );
108108 expect (
109109 () => firestore.collection ('foo/bar/baz/quu' ),
110- throwsAssertionError ,
110+ throwsArgumentError ,
111111 );
112- expect (() => docRef.collection ('foo/bar' ), throwsAssertionError );
113- expect (() => docRef.collection ('foo/bar/baz/quu' ), throwsAssertionError );
112+ expect (() => docRef.collection ('foo/bar' ), throwsArgumentError );
113+ expect (() => docRef.collection ('foo/bar/baz/quu' ), throwsArgumentError );
114114 });
115115
116116 test ('must not have empty segments' , () {
@@ -124,31 +124,31 @@ void main() {
124124 DocumentReference docRef = colRef.doc ('test-document' );
125125
126126 for (final path in badPaths) {
127- expect (() => firestore.collection (path), throwsAssertionError );
128- expect (() => firestore.doc (path), throwsAssertionError );
129- expect (() => colRef.doc (path), throwsAssertionError );
130- expect (() => docRef.collection (path), throwsAssertionError );
127+ expect (() => firestore.collection (path), throwsArgumentError );
128+ expect (() => firestore.doc (path), throwsArgumentError );
129+ expect (() => colRef.doc (path), throwsArgumentError );
130+ expect (() => docRef.collection (path), throwsArgumentError );
131131 }
132132 });
133133
134134 group ('validate' , () {
135135 test ('path must be non-empty strings' , () {
136136 DocumentReference docRef = firestore.doc ('foo/bar' );
137- expect (() => firestore.collection ('' ), throwsAssertionError );
138- expect (() => docRef.collection ('' ), throwsAssertionError );
137+ expect (() => firestore.collection ('' ), throwsArgumentError );
138+ expect (() => docRef.collection ('' ), throwsArgumentError );
139139 });
140140
141141 test ('path must be odd length' , () {
142142 DocumentReference docRef = firestore.doc ('foo/bar' );
143- expect (() => firestore.collection ('foo/bar' ), throwsAssertionError );
143+ expect (() => firestore.collection ('foo/bar' ), throwsArgumentError );
144144 expect (
145145 () => firestore.collection ('foo/bar/baz/quu' ),
146- throwsAssertionError ,
146+ throwsArgumentError ,
147147 );
148- expect (() => docRef.collection ('foo/bar' ), throwsAssertionError );
148+ expect (() => docRef.collection ('foo/bar' ), throwsArgumentError );
149149 expect (
150150 () => docRef.collection ('foo/bar/baz/quu' ),
151- throwsAssertionError ,
151+ throwsArgumentError ,
152152 );
153153 });
154154
@@ -163,10 +163,10 @@ void main() {
163163 DocumentReference docRef = colRef.doc ('test-document' );
164164
165165 for (final String path in badPaths) {
166- expect (() => firestore.collection (path), throwsAssertionError );
167- expect (() => firestore.doc (path), throwsAssertionError );
168- expect (() => colRef.doc (path), throwsAssertionError );
169- expect (() => docRef.collection (path), throwsAssertionError );
166+ expect (() => firestore.collection (path), throwsArgumentError );
167+ expect (() => firestore.doc (path), throwsArgumentError );
168+ expect (() => colRef.doc (path), throwsArgumentError );
169+ expect (() => docRef.collection (path), throwsArgumentError );
170170 }
171171 });
172172 });
0 commit comments