summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/source_type_test.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/source_type_test.cc b/test/source_type_test.cc
index e64aaee..c12e524 100644
--- a/test/source_type_test.cc
+++ b/test/source_type_test.cc
@@ -1,25 +1,25 @@
#include <ctor.h>
#include <task_cc.h>
-std::ostream& operator<<(std::ostream& stream, const ctor::Language& lang);
+std::ostream& operator<<(std::ostream& stream, const ctor::language& lang);
#include <uunit.h>
-std::ostream& operator<<(std::ostream& stream, const ctor::Language& lang)
+std::ostream& operator<<(std::ostream& stream, const ctor::language& lang)
{
switch(lang)
{
- case ctor::Language::Auto:
- stream << "Language::Auto";
+ case ctor::language::automatic:
+ stream << "ctor::language::automatic";
break;
- case ctor::Language::C:
- stream << "Language::C";
+ case ctor::language::c:
+ stream << "ctor::language::c";
break;
- case ctor::Language::Cpp:
- stream << "Language::Cpp";
+ case ctor::language::cpp:
+ stream << "ctor::language::cpp";
break;
- case ctor::Language::Asm:
- stream << "Language::Asm";
+ case ctor::language::assembler:
+ stream << "ctor::language::assembler";
break;
}
@@ -34,7 +34,7 @@ public:
: TaskCC({}, {}, "build", source)
{}
- ctor::Language language() const
+ ctor::language language() const
{
return source_language;
}
@@ -53,22 +53,22 @@ public:
{
{ // c++
TestableTaskCC task("hello.cc");
- uASSERT_EQUAL(ctor::Language::Cpp, task.language());
+ uASSERT_EQUAL(ctor::language::cpp, task.language());
}
{ // c
TestableTaskCC task("hello.c");
- uASSERT_EQUAL(ctor::Language::C, task.language());
+ uASSERT_EQUAL(ctor::language::c, task.language());
}
{ // asm
TestableTaskCC task("hello.s");
- uASSERT_EQUAL(ctor::Language::Asm, task.language());
+ uASSERT_EQUAL(ctor::language::assembler, task.language());
}
{ // custom/explicit language
- TestableTaskCC task( {"hello.foo", ctor::Language::Asm} );
- uASSERT_EQUAL(ctor::Language::Asm, task.language());
+ TestableTaskCC task( {"hello.foo", ctor::language::assembler} );
+ uASSERT_EQUAL(ctor::language::assembler, task.language());
}
// Note: Failure state will result in exit(1) so cannot be tested