(function (_, kotlin_kotlin, kotlin_kotlin_test, kotlin_com_ustadmobile_app_core) {
  'use strict';
  //region block: imports
  var VOID = kotlin_kotlin.$_$.g;
  var assertTrue = kotlin_kotlin_test.$_$.b;
  var abs = kotlin_kotlin.$_$.dg;
  var SavedStateHandle2 = kotlin_com_ustadmobile_app_core.$_$.a;
  var assertEquals = kotlin_kotlin_test.$_$.a;
  var protoOf = kotlin_kotlin.$_$.vf;
  var classMeta = kotlin_kotlin.$_$.ge;
  var setMetadataFor = kotlin_kotlin.$_$.wf;
  var suite = kotlin_kotlin_test.$_$.c;
  var test = kotlin_kotlin_test.$_$.d;
  var Unit_getInstance = kotlin_kotlin.$_$.g6;
  //endregion
  //region block: pre-declaration
  setMetadataFor(SavedStateHandle2Test, 'SavedStateHandle2Test', classMeta, VOID, VOID, SavedStateHandle2Test);
  //endregion
  function assertEqualsWithinThreshold(expected, actual, threshold, message) {
    message = message === VOID ? null : message;
    assertTrue(isWithinThreshold(expected, actual, threshold), message);
  }
  function isWithinThreshold(expected, actual, threshold) {
    return abs(expected.minus_mfbszm_k$(actual)).compareTo_9jj042_k$(threshold) < 0;
  }
  function SavedStateHandle2Test() {
  }
  protoOf(SavedStateHandle2Test).givenStateSavedToHistory_whenNewHandleCreated_thenValueShouldBeRestored_z2amv8_k$ = function () {
    var stateHandle = new SavedStateHandle2(window.history, new URLSearchParams(''));
    stateHandle.set_wua6pr_k$('test', '42');
    var restoredHandle = new SavedStateHandle2(window.history, new URLSearchParams(''));
    assertEquals('42', restoredHandle.get_6bo4tg_k$('test'));
  };
  function test_fun_izoufj() {
    suite('SavedStateHandle2Test', false, test_fun$SavedStateHandle2Test_test_fun_qoxisy);
  }
  function test_fun$SavedStateHandle2Test_test_fun_qoxisy() {
    test('givenStateSavedToHistory_whenNewHandleCreated_thenValueShouldBeRestored', false, test_fun$SavedStateHandle2Test_test_fun$givenStateSavedToHistory_whenNewHandleCreated_thenValueShouldBeRestored_test_fun_jivus1);
    return Unit_getInstance();
  }
  function test_fun$SavedStateHandle2Test_test_fun$givenStateSavedToHistory_whenNewHandleCreated_thenValueShouldBeRestored_test_fun_jivus1() {
    var tmp = new SavedStateHandle2Test();
    tmp.givenStateSavedToHistory_whenNewHandleCreated_thenValueShouldBeRestored_z2amv8_k$();
    return Unit_getInstance();
  }
  //region block: tests
  (function () {
    suite('com.ustadmobile.core.navigation', false, function () {
      test_fun_izoufj();
    });
  }());
  //endregion
  return _;
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlin-kotlin-test-kotlin-test-js-ir.js'), require('./UstadMobile-core.js')));

//# sourceMappingURL=UstadMobile-core-test.js.map
