Skip to content

Commit

Permalink
adjust long chain test for js
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorbel1 committed Nov 25, 2024
1 parent b60515b commit 0b554e8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/long_chain_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,22 @@

import 'package:rohd/rohd.dart';
import 'package:rohd/src/modules/passthrough.dart';
import 'package:rohd/src/utilities/web.dart';
import 'package:test/test.dart';

class LongChain extends Module {
final int length;

Logic get chainOut => output('chainOut');

LongChain(Logic chainIn, {this.length = 1000}) : super(name: 'longChain') {
LongChain(
Logic chainIn, {
this.length =
// for some reason, compiled to JS it hits stack limit sooner
kIsWeb ? 920 : 1050,
}) : super(name: 'longChain') {
chainIn = addInput('chainIn', chainIn);

var intermediate = chainIn;
for (var i = 0; i < length; i++) {
intermediate = ~Passthrough(intermediate).out;
Expand Down

0 comments on commit 0b554e8

Please sign in to comment.