diff options
-rw-r--r-- | lib/efl/native/eina_log.rb | 2 | ||||
-rw-r--r-- | spec/eina_log_spec.rb | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/efl/native/eina_log.rb b/lib/efl/native/eina_log.rb index 96abf7b..555bfe4 100644 --- a/lib/efl/native/eina_log.rb +++ b/lib/efl/native/eina_log.rb @@ -23,7 +23,7 @@ module Efl # ENUMS # typedef enum _Eina_Log_Level {...} Eina_Log_Level; enum :eina_log_level, [ :eina_log_level_critical, :eina_log_level_err, :eina_log_level_warn, :eina_log_level_info, :eina_log_level_dbg, - :eina_log_levels, :eina_log_level_unknown ] + :eina_log_levels, :eina_log_level_unknown, (-2147483647 - 1) ] # # TYPEDEFS # typedef struct _Eina_Log_Domain Eina_Log_Domain; diff --git a/spec/eina_log_spec.rb b/spec/eina_log_spec.rb index cfe31d3..cd07845 100644 --- a/spec/eina_log_spec.rb +++ b/spec/eina_log_spec.rb @@ -20,6 +20,16 @@ describe 'Efl::EinaLog' do EinaLog.level.should == 3 end # + it "eina_log_level enum should be well defined" do + Efl::Native.enum_value(:eina_log_level_critical).should == 0 + Efl::Native.enum_value(:eina_log_level_err).should == 1 + Efl::Native.enum_value(:eina_log_level_warn).should == 2 + Efl::Native.enum_value(:eina_log_level_info).should == 3 + Efl::Native.enum_value(:eina_log_level_dbg).should == 4 + Efl::Native.enum_value(:eina_log_levels).should == 5 + Efl::Native.enum_value(:eina_log_level_unknown).should == (-2147483647-1) + end + # it "color_disable set/get" do bool_check EinaLog, 'color_disable' end |