aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2007-11-06 01:48:46 +0000
committervlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2007-11-06 01:48:46 +0000
commitfea6602591fa7bd899b9f875b327444536f8219c (patch)
tree153748b9f935c9997a23e8194d812c7a897f4ac6 /tests
parentf394b7f27430cd215407ad3ad647f1b696e6c01e (diff)
C90-compliant negative LONG_MIN
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1392 59561ff5-6e30-0410-9f3c-9617f08c8826
Diffstat (limited to 'tests')
-rw-r--r--tests/90-cond-int-type-OK.asn1.-P6
-rw-r--r--tests/90-cond-int-type-OK.asn1.-Pfnative-types6
-rw-r--r--tests/90-cond-int-type-OK.asn1.-Pgen-PER12
3 files changed, 12 insertions, 12 deletions
diff --git a/tests/90-cond-int-type-OK.asn1.-P b/tests/90-cond-int-type-OK.asn1.-P
index 431e42ce..5055e4d7 100644
--- a/tests/90-cond-int-type-OK.asn1.-P
+++ b/tests/90-cond-int-type-OK.asn1.-P
@@ -1754,7 +1754,7 @@ OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
value = *(const long *)sptr;
- if((value >= -2147483648 && value <= 2147483647)) {
+ if((value >= (-2147483647L - 1) && value <= 2147483647)) {
/* Constraint check succeeded */
return 0;
} else {
@@ -1895,7 +1895,7 @@ OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
value = *(const long *)sptr;
- if(((value == -2147483648) || (value == 2147483647))) {
+ if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
/* Constraint check succeeded */
return 0;
} else {
@@ -2042,7 +2042,7 @@ OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
return -1;
}
- if(((value == -2147483648) || (value == 2147483647))) {
+ if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
/* Constraint check succeeded */
return 0;
} else {
diff --git a/tests/90-cond-int-type-OK.asn1.-Pfnative-types b/tests/90-cond-int-type-OK.asn1.-Pfnative-types
index 344c89a0..461e5eb5 100644
--- a/tests/90-cond-int-type-OK.asn1.-Pfnative-types
+++ b/tests/90-cond-int-type-OK.asn1.-Pfnative-types
@@ -1741,7 +1741,7 @@ OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
value = *(const long *)sptr;
- if((value >= -2147483648 && value <= 2147483647)) {
+ if((value >= (-2147483647L - 1) && value <= 2147483647)) {
/* Constraint check succeeded */
return 0;
} else {
@@ -1882,7 +1882,7 @@ OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
value = *(const long *)sptr;
- if(((value == -2147483648) || (value == 2147483647))) {
+ if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
/* Constraint check succeeded */
return 0;
} else {
@@ -2023,7 +2023,7 @@ OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
value = *(const long *)sptr;
- if(((value == -2147483648) || (value == 2147483647))) {
+ if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
/* Constraint check succeeded */
return 0;
} else {
diff --git a/tests/90-cond-int-type-OK.asn1.-Pgen-PER b/tests/90-cond-int-type-OK.asn1.-Pgen-PER
index c7e90db2..d7957cba 100644
--- a/tests/90-cond-int-type-OK.asn1.-Pgen-PER
+++ b/tests/90-cond-int-type-OK.asn1.-Pgen-PER
@@ -2060,7 +2060,7 @@ OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
value = *(const long *)sptr;
- if((value >= -2147483648 && value <= 2147483647)) {
+ if((value >= (-2147483647L - 1) && value <= 2147483647)) {
/* Constraint check succeeded */
return 0;
} else {
@@ -2155,7 +2155,7 @@ OK_IntegerInRange3_encode_uper(asn_TYPE_descriptor_t *td,
/*** <<< CTDEFS [OK-IntegerInRange3] >>> ***/
static asn_per_constraints_t asn_PER_type_OK_IntegerInRange3_constr_1 = {
- { APC_CONSTRAINED, 32, -1, -2147483648, 2147483647 } /* (-2147483648..2147483647) */,
+ { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
@@ -2227,7 +2227,7 @@ OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
value = *(const long *)sptr;
- if(((value == -2147483648) || (value == 2147483647))) {
+ if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
/* Constraint check succeeded */
return 0;
} else {
@@ -2322,7 +2322,7 @@ OK_IntegerInRange4_encode_uper(asn_TYPE_descriptor_t *td,
/*** <<< CTDEFS [OK-IntegerInRange4] >>> ***/
static asn_per_constraints_t asn_PER_type_OK_IntegerInRange4_constr_1 = {
- { APC_CONSTRAINED, 32, -1, -2147483648, 2147483647 } /* (-2147483648..2147483647) */,
+ { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
@@ -2400,7 +2400,7 @@ OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
return -1;
}
- if(((value == -2147483648) || (value == 2147483647))) {
+ if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
/* Constraint check succeeded */
return 0;
} else {
@@ -2495,7 +2495,7 @@ OK_IntegerInRange5_encode_uper(asn_TYPE_descriptor_t *td,
/*** <<< CTDEFS [OK-IntegerInRange5] >>> ***/
static asn_per_constraints_t asn_PER_type_OK_IntegerInRange5_constr_1 = {
- { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, -2147483648, 2147483647 } /* (-2147483648..2147483647,...) */,
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};