<?php

// Generated by Haxe 3.3.0
class thx_TestMaps {
	public function __construct() {}
	public function testTuples() {
		$_g = new haxe_ds_StringMap();
		$_g->set("key1", 1);
		$_g->set("key2", 2);
		$tuples = thx_Maps::tuples($_g);
		$tuples->sort(array(new _hx_lambda(array(), "thx_TestMaps_0"), 'execute'));
		utest_Assert::equals(2, $tuples->length, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 21, "className" => "thx.TestMaps", "methodName" => "testTuples")));
		utest_Assert::equals(_hx_array_get($tuples, 0)->_0, "key1", null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 22, "className" => "thx.TestMaps", "methodName" => "testTuples")));
		utest_Assert::equals(_hx_array_get($tuples, 0)->_1, 1, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 23, "className" => "thx.TestMaps", "methodName" => "testTuples")));
		utest_Assert::equals(_hx_array_get($tuples, 1)->_0, "key2", null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 24, "className" => "thx.TestMaps", "methodName" => "testTuples")));
		utest_Assert::equals(_hx_array_get($tuples, 1)->_1, 2, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 25, "className" => "thx.TestMaps", "methodName" => "testTuples")));
	}
	public function testValues() {
		$_g = new haxe_ds_StringMap();
		$_g->set("key1", 1);
		$_g->set("key2", 2);
		$_g->set("key3", 3);
		$tmp = thx_Maps::values($_g);
		$values = thx_Arrays::order($tmp, (isset(thx_Ints::$compare) ? thx_Ints::$compare: array("thx_Ints", "compare")));
		utest_Assert::same((new _hx_array(array(1, 2, 3))), $values, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 35, "className" => "thx.TestMaps", "methodName" => "testValues")));
	}
	public function testGetOption() {
		$_g = new haxe_ds_StringMap();
		$_g->set("key1", 1);
		$tmp = thx_Maps::getOption($_g, "key1");
		utest_Assert::same(thx_Options::get($tmp), 1, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 41, "className" => "thx.TestMaps", "methodName" => "testGetOption")));
		$tmp1 = thx_Maps::getOption($_g, "key2");
		utest_Assert::same(thx_Options::toBool($tmp1), false, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 42, "className" => "thx.TestMaps", "methodName" => "testGetOption")));
	}
	public function testMerge() {
		$_g = new haxe_ds_StringMap();
		$_g->set("key1", 1);
		$_g->set("key2", 1);
		$_g->set("key3", 1);
		$_g1 = new haxe_ds_StringMap();
		$_g1->set("key2", 2);
		$_g1->set("key3", 2);
		$_g2 = new haxe_ds_StringMap();
		$_g2->set("key3", 3);
		$result1 = thx_Maps::merge(new haxe_ds_StringMap(), (new _hx_array(array($_g, $_g1, $_g2))));
		$tmp = $result1->keys();
		utest_Assert::same(3, thx_Iterators::toArray($tmp)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 60, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp1 = $result1->get("key1");
		utest_Assert::same(1, $tmp1, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 61, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp2 = $result1->get("key2");
		utest_Assert::same(2, $tmp2, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 62, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp3 = $result1->get("key3");
		utest_Assert::same(3, $tmp3, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 63, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$_g3 = new haxe_ds_StringMap();
		$_g3->set("mykey", 5);
		$result2 = thx_Maps::merge($_g3, (new _hx_array(array())));
		$tmp4 = $result2->keys();
		utest_Assert::same(1, thx_Iterators::toArray($tmp4)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 67, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp5 = $result2->get("mykey");
		utest_Assert::same(5, $tmp5, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 68, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp6 = $_g->keys();
		utest_Assert::same(3, thx_Iterators::toArray($tmp6)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 71, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(1, $_g->get("key1"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 72, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(1, $_g->get("key2"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 73, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(1, $_g->get("key3"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 74, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp7 = $_g1->keys();
		utest_Assert::same(2, thx_Iterators::toArray($tmp7)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 75, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(2, $_g1->get("key2"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 76, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(2, $_g1->get("key3"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 77, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp8 = $_g2->keys();
		utest_Assert::same(1, thx_Iterators::toArray($tmp8)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 78, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(3, $_g2->get("key3"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 79, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$result3 = thx_Maps::merge($_g, (new _hx_array(array($_g1, $_g2))));
		$tmp9 = $result3->keys();
		utest_Assert::same(3, thx_Iterators::toArray($tmp9)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 84, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp10 = $result3->get("key1");
		utest_Assert::same(1, $tmp10, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 85, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp11 = $result3->get("key2");
		utest_Assert::same(2, $tmp11, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 86, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp12 = $result3->get("key3");
		utest_Assert::same(3, $tmp12, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 87, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp13 = $_g->keys();
		utest_Assert::same(3, thx_Iterators::toArray($tmp13)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 88, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(1, $_g->get("key1"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 89, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(2, $_g->get("key2"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 90, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(3, $_g->get("key3"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 91, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp14 = $_g1->keys();
		utest_Assert::same(2, thx_Iterators::toArray($tmp14)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 92, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(2, $_g1->get("key2"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 93, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(2, $_g1->get("key3"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 94, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		$tmp15 = $_g2->keys();
		utest_Assert::same(1, thx_Iterators::toArray($tmp15)->length, null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 95, "className" => "thx.TestMaps", "methodName" => "testMerge")));
		utest_Assert::same(3, $_g2->get("key3"), null, null, null, _hx_anonymous(array("fileName" => "TestMaps.hx", "lineNumber" => 96, "className" => "thx.TestMaps", "methodName" => "testMerge")));
	}
	function __toString() { return 'thx.TestMaps'; }
}
function thx_TestMaps_0($a, $b) {
	{
		return haxe_Utf8::compare($a->_0, $b->_0);
	}
}
