run fuzzing more when miri is deactivated
This commit is contained in:
1 parent
22f2c0ad9b
commit
7b45a3a98b
1 file changed
+5
-3
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use dioxus::prelude::Props;
|
use dioxus::prelude::Props;
|
||||||
use dioxus_core::*;
|
use dioxus_core::*;
|
||||||
use std::collections::HashSet;
|
use std::{cfg, collections::HashSet};
|
||||||
|
|
||||||
fn random_ns() -> Option<&'static str> {
|
fn random_ns() -> Option<&'static str> {
|
||||||
let namespace = rand::random::<u8>() % 2;
|
let namespace = rand::random::<u8>() % 2;
|
||||||
@@ -307,7 +307,8 @@ fn create_random_element(cx: Scope<DepthProps>) -> Element {
|
|||||||
// test for panics when creating random nodes and templates
|
// test for panics when creating random nodes and templates
|
||||||
#[test]
|
#[test]
|
||||||
fn create() {
|
fn create() {
|
||||||
for _ in 0..100 {
|
let repeat_count = if cfg!(miri) { 100 } else { 1000 };
|
||||||
|
for _ in 0..repeat_count {
|
||||||
let mut vdom =
|
let mut vdom =
|
||||||
VirtualDom::new_with_props(create_random_element, DepthProps { depth: 0, root: true });
|
VirtualDom::new_with_props(create_random_element, DepthProps { depth: 0, root: true });
|
||||||
let _ = vdom.rebuild();
|
let _ = vdom.rebuild();
|
||||||
@@ -318,7 +319,8 @@ fn create() {
|
|||||||
// This test will change the template every render which is not very realistic, but it helps stress the system
|
// This test will change the template every render which is not very realistic, but it helps stress the system
|
||||||
#[test]
|
#[test]
|
||||||
fn diff() {
|
fn diff() {
|
||||||
for _ in 0..10 {
|
let repeat_count = if cfg!(miri) { 100 } else { 1000 };
|
||||||
|
for _ in 0..repeat_count {
|
||||||
let mut vdom =
|
let mut vdom =
|
||||||
VirtualDom::new_with_props(create_random_element, DepthProps { depth: 0, root: true });
|
VirtualDom::new_with_props(create_random_element, DepthProps { depth: 0, root: true });
|
||||||
let _ = vdom.rebuild();
|
let _ = vdom.rebuild();
|
||||||
|
|||||||
Reference in new issue
Block a user