diff --git a/auto/generate_module.rb b/auto/generate_module.rb index f7e1598..119234c 100644 --- a/auto/generate_module.rb +++ b/auto/generate_module.rb @@ -168,13 +168,13 @@ class UnityModuleGenerator end ############################ - def neutralize_filename(name, start_cap=true) + def neutralize_filename(name, start_cap = true) return name if name.empty? - name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map{|v|v.capitalize}.join('_') - if start_cap - return name + name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map { |v| v.capitalize }.join('_') + return if start_cap + name else - return name[0].downcase + name[1..-1] + name[0].downcase + name[1..-1] end end @@ -182,8 +182,8 @@ class UnityModuleGenerator def create_filename(part1, part2 = '') name = part2.empty? ? part1 : part1 + '_' + part2 case (@options[:naming]) - when 'bumpy' then neutralize_filename(name,false).gsub('_','') - when 'camel' then neutralize_filename(name).gsub('_','') + when 'bumpy' then neutralize_filename(name,false).delete('_') + when 'camel' then neutralize_filename(name).delete('_') when 'snake' then neutralize_filename(name).downcase when 'caps' then neutralize_filename(name).upcase else name diff --git a/src/unity.c b/src/unity.c index 0426d03..be3528f 100644 --- a/src/unity.c +++ b/src/unity.c @@ -1002,8 +1002,7 @@ void UnityAssertFloatSpecial(const UNITY_FLOAT actual, is_trait = !isinf(actual) && !isnan(actual); break; - case UNITY_FLOAT_INVALID_TRAIT: - default: + default: /* including UNITY_FLOAT_INVALID_TRAIT */ trait_index = 0; trait_names[0] = UnityStrInvalidFloatTrait; break; @@ -1143,8 +1142,7 @@ void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual, is_trait = !isinf(actual) && !isnan(actual); break; - case UNITY_FLOAT_INVALID_TRAIT: - default: + default: /* including UNITY_FLOAT_INVALID_TRAIT */ trait_index = 0; trait_names[0] = UnityStrInvalidFloatTrait; break; diff --git a/test/Makefile b/test/Makefile index d8d10d2..5be0488 100644 --- a/test/Makefile +++ b/test/Makefile @@ -10,6 +10,7 @@ endif CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror #CFLAGS += -Wconversion #disabled because if falsely complains about the isinf and isnan macros CFLAGS += -Wno-switch-enum -Wno-double-promotion +CFLAGS += -Wno-poison-system-directories CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstrict-overflow \ -Wstrict-prototypes -Wswitch-default -Wundef #DEBUG = -O0 -g diff --git a/test/rakefile_helper.rb b/test/rakefile_helper.rb index e205bc6..8678944 100644 --- a/test/rakefile_helper.rb +++ b/test/rakefile_helper.rb @@ -300,8 +300,8 @@ module RakefileHelpers def run_make_tests() [ "make -s", # test with all defaults - "make -s DEBUG=-m32", # test 32-bit architecture with 64-bit support - "make -s DEBUG=-m32 UNITY_SUPPORT_64=", # test 32-bit build without 64-bit types + #"make -s DEBUG=-m32", # test 32-bit architecture with 64-bit support + #"make -s DEBUG=-m32 UNITY_SUPPORT_64=", # test 32-bit build without 64-bit types "make -s UNITY_INCLUDE_DOUBLE= ", # test without double "cd #{File.join("..","extras","fixture",'test')} && make -s default noStdlibMalloc", "cd #{File.join("..","extras","fixture",'test')} && make -s C89",