import * as Base64ToUint8Array_tester from "./Base64ToUint8Array_tester.js";
import * as GSheet_tester from "./GSheet_tester.js";
import * as ScriptLoader from "../ScriptLoader.js";
import * as ValueMax from "../ValueMax.js";
import * as PartTime from "../PartTime.js";

window.addEventListener("load", event => {
  ScriptLoader.createPromise("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.7.0/dist/tf.min.js").then(test); });

function test() {
  console.log("util testing...");
  let delayMilliseconds = 1000;

  // Aggregate all progress about util_tester.
  let progress = new ValueMax.Percentage.Aggregate();
  let progress_Base64ToUint8Array_tester = progress.addChild( new ValueMax.Percentage.Aggregate() );
  let progress_GSheet_tester = progress.addChild( new ValueMax.Percentage.Aggregate() );

  let progressReceiver = new ValueMax.Receiver.HTMLProgress.createByTitle_or_getDummy("TestProgressBar");

//   for await ( let progressRoot of Base64ToUint8Array_tester.tester( progress_Base64ToUint8Array_tester ) ) {
//   }

  function* testerAll() {
    yield* Base64ToUint8Array_tester.tester( progress_Base64ToUint8Array_tester );
    yield* GSheet_tester.tester( progress_GSheet_tester );
  }

  let tester = testerAll();

  let testPromise = PartTime.forOf(
    tester,
    ( progressRoot ) => { progressReceiver.setValueMax( progressRoot.valuePercentage, progressRoot.maxPercentage ); }, // Report progress to UI.
    delayMilliseconds
  ).then(r => {
  });

//   progressReceiver.informDone(r); // Inform UI progress done.

  testPromise.then(values => {
    console.log("util testing... Done.");
  });

//!!! ...unfinished... test case by multipler web worker?
}

@@ -504,17 +504,16 @@
 ds = 100
-0
 ;%0A%0A  // 

Update util_tester.js