From 8ed8172ace50b7f8ee691ddfe3cc8eb87904b934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 23 Jan 2012 11:21:49 +0100 Subject: EinaLog : update enum :eina_log_level and specs --- lib/efl/native/eina_log.rb | 2 +- spec/eina_log_spec.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 -- cgit v1.1-2-g2b99