Skip to content

Commit

Permalink
Merge 0514964 into 81ed943
Browse files Browse the repository at this point in the history
  • Loading branch information
desistefanova committed Mar 2, 2022
2 parents 81ed943 + 0514964 commit fdeb4a9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/realm-dart-macos.yml
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Run tests
run: |
dart test -r expanded -j 1 --test-randomize-ordering-seed random
dart test -r expanded -j 1 --test-randomize-ordering-seed random --chain-stack-traces
echo "ARCHIVE_PATH=$(pwd)/binary/macos.tar.gz" >> $GITHUB_ENV
- name: Archive binary
Expand Down
15 changes: 15 additions & 0 deletions test/results_test.dart
Expand Up @@ -138,6 +138,21 @@ Future<void> main([List<String>? args]) async {
realm.close();
});

test('Results requested wrong index throws', () {
var config = Configuration([Car.schema]);
var realm = Realm(config);

final car = Car('');
realm.write(() => realm.add(car));

final cars = realm.all<Car>();
realm.write(() => realm.deleteMany(cars));

expect(() => cars[0], throws<RealmException>("Requested index 0 in empty Results"));

realm.close();
});

test('Results iteration test', () {
var config = Configuration([Team.schema, Person.schema]);
var realm = Realm(config);
Expand Down

0 comments on commit fdeb4a9

Please sign in to comment.