summaryrefslogtreecommitdiffstats
path: root/generator/generator_utils.ml
diff options
context:
space:
mode:
Diffstat (limited to 'generator/generator_utils.ml')
-rw-r--r--generator/generator_utils.ml12
1 files changed, 12 insertions, 0 deletions
diff --git a/generator/generator_utils.ml b/generator/generator_utils.ml
index aa7fcba3..e35842e1 100644
--- a/generator/generator_utils.ml
+++ b/generator/generator_utils.ml
@@ -255,6 +255,9 @@ let name_of_argt = function
| StringList n | DeviceList n | Bool n | Int n | Int64 n
| FileIn n | FileOut n | BufferIn n | Key n | Pointer (_, n) -> n
+let name_of_optargt = function
+ | OBool n | OInt n | OInt64 n | OString n -> n
+
let seq_of_test = function
| TestRun s | TestOutput (s, _) | TestOutputList (s, _)
| TestOutputListOfDevices (s, _)
@@ -345,3 +348,12 @@ let chars c n =
str
let spaces n = chars ' ' n
+
+let args_of_optargs optargs =
+ List.map (
+ function
+ | OBool n -> Bool n
+ | OInt n -> Int n
+ | OInt64 n -> Int64 n
+ | OString n -> String n
+ ) optargs;