From a99bf349a7e82940035150221db8d2a912bf398c Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 15 Feb 2016 16:14:09 -0800 Subject: [PATCH] use test objects and 'of' for realm tests --- examples/ReactNativeBenchmarks/benchmarks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ReactNativeBenchmarks/benchmarks.js b/examples/ReactNativeBenchmarks/benchmarks.js index d3ac5650..0d6d5c07 100644 --- a/examples/ReactNativeBenchmarks/benchmarks.js +++ b/examples/ReactNativeBenchmarks/benchmarks.js @@ -84,9 +84,9 @@ class RealmTests extends Tests { async insertions() { var realm = this.realm; - for (let i = 0; i < numTestObjects; i++) { + for (var obj of this.testObjects(numTestObjects)) { realm.write(() => { - realm.create("TestObject", { int: i % numQueryBuckets, double: i, date: new Date(i), string: "" + i }); + realm.create("TestObject", obj); }); } }