[aravis] gc_integer: test min, max and inc.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] gc_integer: test min, max and inc.
- Date: Tue, 6 Mar 2012 17:03:59 +0000 (UTC)
commit abd1c63bf850dec1a6c11921f74b6f5c16e8ee9d
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Tue Mar 6 18:03:27 2012 +0100
gc_integer: test min, max and inc.
tests/data/genicam.xml | 18 ++++++++++++++++++
tests/genicam.c | 18 ++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/tests/data/genicam.xml b/tests/data/genicam.xml
index e3db315..7b1a45a 100644
--- a/tests/data/genicam.xml
+++ b/tests/data/genicam.xml
@@ -64,10 +64,28 @@
<Integer Name="RWInteger">
<Value>1</Value>
+ <Min>-10</Min>
+ <Max>10</Max>
+ <Inc>2</Inc>
+ </Integer>
+
+ <Integer Name="P_RWInteger_Min">
+ <Value>-20</Value>
+ </Integer>
+
+ <Integer Name="P_RWInteger_Max">
+ <Value>20</Value>
+ </Integer>
+
+ <Integer Name="P_RWInteger_Inc">
+ <Value>3</Value>
</Integer>
<Integer Name="P_RWInteger">
<pValue>RWInteger</pValue>
+ <pMin>P_RWInteger_Min</pMin>
+ <pMax>P_RWInteger_Max</pMax>
+ <pInc>P_RWInteger_Inc</pInc>
</Integer>
<Enumeration Name="Enumeration">
diff --git a/tests/genicam.c b/tests/genicam.c
index 975ea08..974c7dc 100644
--- a/tests/genicam.c
+++ b/tests/genicam.c
@@ -22,6 +22,15 @@ integer_test (void)
v_int64 = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
g_assert_cmpint (v_int64, ==, 1);
+ v_int64 = arv_gc_integer_get_min (ARV_GC_INTEGER (node));
+ g_assert_cmpint (v_int64, ==, -10);
+
+ v_int64 = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
+ g_assert_cmpint (v_int64, ==, 10);
+
+ v_int64 = arv_gc_integer_get_inc (ARV_GC_INTEGER (node));
+ g_assert_cmpint (v_int64, ==, 2);
+
v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node));
g_assert_cmpstr (v_string, ==, "1");
@@ -35,6 +44,15 @@ integer_test (void)
v_int64 = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
g_assert_cmpint (v_int64, ==, 2);
+ v_int64 = arv_gc_integer_get_min (ARV_GC_INTEGER (node));
+ g_assert_cmpint (v_int64, ==, -20);
+
+ v_int64 = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
+ g_assert_cmpint (v_int64, ==, 20);
+
+ v_int64 = arv_gc_integer_get_inc (ARV_GC_INTEGER (node));
+ g_assert_cmpint (v_int64, ==, 3);
+
g_object_unref (device);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]