From 8746b911b06fe0fc3060c9c12493c13edfcdbd7e Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 摹曛, 08 10月 2015 04:08:06 +0800
Subject: [PATCH] Add SCPI_Param tests for Int32, UInt32, Int64 and UInt64

---
 examples/common/scpi-def.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/examples/common/scpi-def.c b/examples/common/scpi-def.c
index e1089cc..91658e6 100644
--- a/examples/common/scpi-def.c
+++ b/examples/common/scpi-def.c
@@ -151,7 +151,7 @@
     SCPI_ChoiceToName(trigger_source, param, &name);
     fprintf(stderr, "\tP1=%s (%ld)\r\n", name, (long int)param);
     
-    SCPI_ResultInt(context, param);
+    SCPI_ResultInt32(context, param);
 
     return SCPI_RES_OK;
 }
@@ -159,7 +159,7 @@
 static scpi_result_t TEST_Numbers(scpi_t * context) {
     int32_t numbers[2];
 
-    SCPI_CommandNumbers(context, numbers, 2);
+    SCPI_CommandNumbers(context, numbers, 2, 1);
 
     fprintf(stderr, "TEST numbers %d %d\r\n", numbers[0], numbers[1]);
 
@@ -170,8 +170,9 @@
     char buffer[100];
     size_t copy_len;
 
-    buffer[0] = 0;
-    SCPI_ParamCopyText(context, buffer, 100, &copy_len, FALSE);
+    if (!SCPI_ParamCopyText(context, buffer, sizeof(buffer), &copy_len, FALSE)) {
+        buffer[0] = '\0';
+    }
 
     fprintf(stderr, "TEXT: ***%s***\r\n", buffer);
 
@@ -199,7 +200,7 @@
  */
 static scpi_result_t My_CoreTstQ(scpi_t * context) {
 
-    SCPI_ResultInt(context, 0);
+    SCPI_ResultInt32(context, 0);
 
     return SCPI_RES_OK;
 }

--
Gitblit v1.9.1