Skip to content

Commit

Permalink
Fix some sensitive tests to be more robust (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorbel1 authored Jul 25, 2023
1 parent 160eb5c commit 722d5c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
5 changes: 0 additions & 5 deletions benchmark/many_seq_and_comb_benchmark.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ class ManySeqAndCombBenchmark extends AsyncBenchmarkBase {
ManySeqAndCombBenchmark(this.combConnectionType)
: super('ManySeqAndCombBenchmark_${combConnectionType.name}');

@override
Future<void> teardown() async {
await Simulator.reset();
}

@override
Future<void> run() async {
final combinationalWrapper = _CombinationalWrapper(
Expand Down
15 changes: 10 additions & 5 deletions test/ssa_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,15 @@ void main() {
];

// make sure we don't have any inferred latches (X's)
for (final signal in mod.signals) {
signal.changed.listen((event) {
expect(event.newValue.isValid, isTrue);
});
}
Simulator.registerAction(15, () {
for (final signal in mod.signals) {
expect(signal.value.isValid, isTrue);
}
for (final signal in mod.signals) {
signal.changed.listen((event) {
expect(event.newValue.isValid, isTrue);
});
}
});

await SimCompare.checkFunctionalVector(mod, vectors);
Expand All @@ -400,6 +400,11 @@ void main() {
for (final signal in mod.signals) {
expect(signal.value.isValid, isTrue);
}
for (final signal in mod.signals) {
signal.changed.listen((event) {
expect(event.newValue.isValid, isTrue);
});
}
});

await SimCompare.checkFunctionalVector(mod, vectors);
Expand Down

0 comments on commit 722d5c4

Please sign in to comment.