diff options
Diffstat (limited to 'linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs')
-rw-r--r-- | linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs b/linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs new file mode 100644 index 000000000..49114eb84 --- /dev/null +++ b/linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using Mono.Linker.Tests.Extensions; + +namespace Mono.Linker.Tests.TestCasesRunner { + public class LinkerArgumentBuilder { + private readonly List<string> _arguments = new List<string> (); + + public virtual void AddSearchDirectory (NPath directory) + { + Append ("-d"); + Append (directory.ToString ()); + } + + public virtual void AddOutputDirectory (NPath directory) + { + Append ("-o"); + Append (directory.ToString ()); + } + + public virtual void AddLinkXmlFile (NPath path) + { + Append ("-x"); + Append (path.ToString ()); + } + + public virtual void AddCoreLink (string value) + { + Append ("-c"); + Append (value); + } + + public string [] ToArgs () + { + return _arguments.ToArray (); + } + + protected void Append (string arg) + { + _arguments.Add (arg); + } + } +}
\ No newline at end of file |