Jan Breuer
2015-01-18 834faf3b0a91d6af089258d9917fbc86a92699a1
Resolve #18 *TST? should return 0 as OK

- it should be completely customizable, what return value is return
from the callback function
- Returning 0 from callback means "test was OK"
- Other number means, that some error bits are set
- Type of callback is still wrong - it should be int and not
scpi_result_t but it will change API. It will be part of next version
5个文件已修改
25 ■■■■ 已修改文件
examples/test-LwIP-netconn/scpi_server.c 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-interactive/main.c 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-parser/main.c 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-tcp-srq/main.c 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-tcp/main.c 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-LwIP-netconn/scpi_server.c
@@ -146,10 +146,13 @@
    return SCPI_RES_OK;
}
/**
 * Return 0 as OK and other number as error
 */
scpi_result_t SCPI_Test(scpi_t * context) {
    (void) context;
    iprintf("**Test\r\n");
    return SCPI_RES_OK;
    return 0;
}
scpi_result_t SCPI_Reset(scpi_t * context) {
examples/test-interactive/main.c
@@ -65,9 +65,12 @@
    return SCPI_RES_OK;
}
/**
 * Return 0 as OK and other number as error
 */
scpi_result_t SCPI_Test(scpi_t * context) {
    fprintf(stderr, "**Test\r\n");
    return SCPI_RES_OK;
    return 0;
}
scpi_result_t SCPI_Reset(scpi_t * context) {
examples/test-parser/main.c
@@ -65,9 +65,12 @@
    return SCPI_RES_OK;
}
/**
 * Return 0 as OK and other number as error
 */
scpi_result_t SCPI_Test(scpi_t * context) {
    fprintf(stderr, "**Test\r\n");
    return SCPI_RES_OK;
    return 0;
}
scpi_result_t SCPI_Reset(scpi_t * context) {
examples/test-tcp-srq/main.c
@@ -108,9 +108,12 @@
    return SCPI_RES_OK;
}
/**
 * Return 0 as OK and other number as error
 */
scpi_result_t SCPI_Test(scpi_t * context) {
    fprintf(stderr, "**Test\r\n");
    return SCPI_RES_OK;
    return 0;
}
scpi_result_t SCPI_Reset(scpi_t * context) {
examples/test-tcp/main.c
@@ -76,9 +76,12 @@
    return SCPI_RES_OK;
}
/**
 * Return 0 as OK and other number as error
 */
scpi_result_t SCPI_Test(scpi_t * context) {
    fprintf(stderr, "**Test\r\n");
    return SCPI_RES_OK;
    return 0;
}
scpi_result_t SCPI_Reset(scpi_t * context) {