From 10dc0902c22ae931fe51c36ea8fc6d2453819477 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 11 Jan 2023 17:55:39 +0100 Subject: Rename Language::Xyz to language::xyz --- test/source_type_test.cc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'test') 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 #include -std::ostream& operator<<(std::ostream& stream, const ctor::Language& lang); +std::ostream& operator<<(std::ostream& stream, const ctor::language& lang); #include -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 -- cgit v1.2.3