removes invalid test in vs2010 filters
removes dead function vs10_helpers.table_of_filters
This commit is contained in:
parent
a51fc3da63
commit
51abe69396
@ -33,27 +33,11 @@ local vs10_helpers = premake.vstudio.vs10_helpers
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
--function is used in tests yet not longer used in this file
|
||||
function vs10_helpers.table_of_filters(t)
|
||||
local filters ={}
|
||||
|
||||
for key, value in pairs(t) do
|
||||
local result = vs10_helpers.list_of_directories_in_path(value)
|
||||
for __,dir in ipairs(result) do
|
||||
if table.contains(filters,dir) ~= true then
|
||||
filters[#filters +1] = dir
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return filters
|
||||
end
|
||||
|
||||
function vs10_helpers.table_of_file_filters(files)
|
||||
local filters ={}
|
||||
|
||||
for key, valueTable in pairs(files) do
|
||||
for _, valueTable in pairs(files) do
|
||||
for _, entry in ipairs(valueTable) do
|
||||
local result = vs10_helpers.list_of_directories_in_path(entry)
|
||||
for __,dir in ipairs(result) do
|
||||
|
@ -95,14 +95,6 @@
|
||||
test.isequal("foo",result)
|
||||
end
|
||||
|
||||
--[[
|
||||
never passed nil
|
||||
function vs10_filters.listOfDirectories_passedNil_returnsIsEmpty()
|
||||
local result = vs10_helpers.list_of_directories_in_path(nil)
|
||||
test.isequal(0,#result)
|
||||
end
|
||||
--]]
|
||||
|
||||
function vs10_filters.listOfDirectories_oneDirectory_returnsSizeIsOne()
|
||||
local result = vs10_helpers.list_of_directories_in_path("foo\\bar.h")
|
||||
test.isequal(1,#result)
|
||||
@ -128,111 +120,6 @@
|
||||
test.isequal(0,#result)
|
||||
end
|
||||
|
||||
|
||||
--not used in premake only the tests
|
||||
function vs10_filters.tableOfFilters_emptyTable_returnsEmptyTable()
|
||||
t = {}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal(0,#result)
|
||||
end
|
||||
|
||||
function vs10_filters.tableOfFilters_tableHasFilesYetNoDirectories_returnSizeIsZero()
|
||||
t =
|
||||
{
|
||||
'foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal(0,#result)
|
||||
end
|
||||
|
||||
function vs10_filters.tableOfFilters_tableHasOneDirectory_returnSizeIsOne()
|
||||
t =
|
||||
{
|
||||
'bar\\foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal(1,#result)
|
||||
end
|
||||
function vs10_filters.tableOfFilters_tableHasTwoDirectories_returnSizeIsOne()
|
||||
t =
|
||||
{
|
||||
'bar\\foo.h',
|
||||
'baz\\foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal(2,#result)
|
||||
end
|
||||
function vs10_filters.tableOfFilters_tableHasTwoDirectories_firstEntryIsBar()
|
||||
t =
|
||||
{
|
||||
'bar\\foo.h',
|
||||
'baz\\foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal("bar",result[1])
|
||||
end
|
||||
function vs10_filters.tableOfFilters_tableHasTwoDirectories_secondEntryIsBaz()
|
||||
t =
|
||||
{
|
||||
'bar\\foo.h',
|
||||
'baz\\foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal("baz",result[2])
|
||||
end
|
||||
|
||||
function vs10_filters.tableOfFilters_tableHasTwoSameDirectories_returnSizeIsOne()
|
||||
t =
|
||||
{
|
||||
'bar\\foo.h',
|
||||
'bar\\baz.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal(1,#result)
|
||||
end
|
||||
|
||||
function vs10_filters.tableOfFilters_tableEntryHasTwoDirectories_returnSizeIsTwo()
|
||||
t =
|
||||
{
|
||||
'bar\\baz\\foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal(2,#result)
|
||||
end
|
||||
|
||||
function vs10_filters.tableOfFilters_tableEntryHasTwoDirectories_firstEntryIsBarSlashBar()
|
||||
t =
|
||||
{
|
||||
'bar\\baz\\foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal('bar',result[1])
|
||||
end
|
||||
|
||||
function vs10_filters.tableOfFilters_tableEntryHasTwoDirectories_secondEntryIsBarSlashBaz()
|
||||
t =
|
||||
{
|
||||
'bar\\baz\\foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal('bar\\baz',result[2])
|
||||
end
|
||||
|
||||
|
||||
function vs10_filters.tableOfFilters_tableEntryHasTwoDirectoriesSecondDirisAlsoInNextEntry_returnSizeIsThree()
|
||||
t =
|
||||
{
|
||||
'bar\\baz\\foo.h',
|
||||
'baz\\foo.h'
|
||||
}
|
||||
local result = vs10_helpers.table_of_filters(t)
|
||||
test.isequal(3,#result)
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
|
||||
|
||||
function vs10_filters.tableOfFileFilters_returnSizeIsTwo()
|
||||
local t =
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user