diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-11 17:55:39 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-11 17:55:39 +0100 |
commit | 10dc0902c22ae931fe51c36ea8fc6d2453819477 (patch) | |
tree | 0b66071313e48e61ad02e58010e3f3dfda8e4b34 /test | |
parent | 75d1fa7244b9c5cddae056a281f457dd1e81cfb2 (diff) |
Rename Language::Xyz to language::xyz
Diffstat (limited to 'test')
-rw-r--r-- | test/source_type_test.cc | 32 |
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 |