Skip to content

Commit

Permalink
Add tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Sep 17, 2024
1 parent 45b6de0 commit 2ad4923
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/tools/test_clang.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,16 @@ function suite.cxxflags_onSanitizeFuzzer()
prepare()
test.contains({ "-fsanitize=fuzzer" }, clang.getcxxflags(cfg))
end

--
-- Check the handling of `getrelative` hook.
--

function suite.onGetRelative()
toolset "clang"
prepare()
local toolset = p.config.toolset(cfg)
print(toolset)
test.isnotnil(toolset.getrelative)
end

12 changes: 12 additions & 0 deletions tests/tools/test_dotnet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,15 @@ function suite.flags_csversion()
csversion "7.2"
test.contains({ "/langversion:7.2" }, dotnet.getflags(cfg))
end


--
-- Check the handling of `getrelative` hook.
--

function suite.onGetRelative()
toolset "dotnet"
prepare()
local toolset = p.config.toolset(cfg)
test.isnotnil(toolset.getrelative)
end
11 changes: 11 additions & 0 deletions tests/tools/test_gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1149,3 +1149,14 @@
test.contains({ "-x objective-c++" }, gcc.getcflags(cfg))
test.contains({ "-x objective-c++" }, gcc.getcxxflags(cfg))
end

--
-- Check the handling of `getrelative` hook.
--

function suite.onGetRelative()
toolset "gcc"
prepare()
local toolset = p.config.toolset(cfg)
test.isnotnil(toolset.getrelative)
end
11 changes: 11 additions & 0 deletions tests/tools/test_msc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -759,3 +759,14 @@ end
prepare()
test.isequal({ "/MD", "/Z7" }, msc.getcflags(cfg))
end

--
-- Check the handling of `getrelative` hook.
--

function suite.onGetRelative()
toolset "msc"
prepare()
local toolset = p.config.toolset(cfg)
test.isnotnil(toolset.getrelative)
end
11 changes: 11 additions & 0 deletions tests/tools/test_snc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,14 @@
prepare()
test.isequal({'-include stdafx.h', '-include include/sys.h'}, snc.getforceincludes(cfg))
end

--
-- Check the handling of `getrelative` hook.
--

function suite.onGetRelative()
toolset "snc"
prepare()
local toolset = p.config.toolset(cfg)
test.isnotnil(toolset.getrelative)
end

0 comments on commit 2ad4923

Please sign in to comment.