Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_table.lua « tests - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 60b5c4707547a6add6483de3d5994b543fde1dd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--
-- tests/test_table.lua
-- Automated test suite for the new table functions.
-- Copyright (c) 2008 Jason Perkins and the Premake project
--


	T.table = { }


--
-- table.contains() tests
--

	function T.table.contains_OnContained()
		t = { "one", "two", "three" }
		test.istrue( table.contains(t, "two") )
	end

	function T.table.contains_OnNotContained()
		t = { "one", "two", "three" }
		test.isfalse( table.contains(t, "four") )
	end

	
--
-- table.implode() tests
--

	function T.table.implode()
		t = { "one", "two", "three", "four" }
		test.isequal("[one], [two], [three], [four]", table.implode(t, "[", "]", ", "))
	end