// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-
package main
import fmt "fmt"
}
}
- // test existence with zero check
- // failed lookups yield the 'zero' of the type.
- // a later loop uses the more reliable tuple check.
- for i := 1; i < count; i++ { // loop from 1 to avoid the real 'zeros'
- s := F.d(i).str();
- f := float(i);
- // BUG t := T(s, f);
- var t T; t.s = s; t.f = f;
- // BUG m := M(i, i+1);
- if mib[i] == false {
- F.s("existence: mib[").d(i).s("] == false").putnl();
- }
- if mii[i] == 0 {
- F.s("existence: mii[").d(i).s("] == 0").putnl();
- }
- if mfi[f] == 0 {
- F.s("existence: mfi[").g(f).s("] == 0").putnl();
- }
- if mif[i] == 0.0 {
- F.s("existence: mif[").d(i).s("] == 0.0").putnl();
- }
- if mis[i] == "" {
- F.s("existence: mis[").d(i).s("] == ``").putnl();
- }
- if msi[s] == 0 {
- F.s("existence: msi[").s(s).s("] == 0").putnl();
- }
- if mss[s] == `` {
- F.s("existence: mss[").s(s).s("] == ``").putnl();
- }
- if mspa[s] == nil {
- F.s("existence: mspa[").s(s).s("] == ``").putnl();
- }
- if mipT[i] == nil {
- F.s("existence: mipT[").d(i).s("] == nil").putnl();
- }
- if mpTi[apT[i]] == 0 {
- F.s("existence: mpTi[apT[").d(i).s("]] == 0").putnl();
- }
-// if mti[t] == 0 {
-// //emit stdout <- format("haskey mti[%s] false", string(t));
-// }
- if mipM[i] == nil {
- F.s("existence: mipM[").d(i).s("] == nil").putnl();
- }
- }
-
- // test nonexistence with zero check
- // failed lookups yield the 'zero' of the type.
- // a later loop uses the more reliable tuple check.
- for i := count; i < 2*count; i++ {
- s := F.d(i).str();
- f := float(i);
- // BUG t := T(s, f);
- var t T; t.s = s; t.f = f;
- // BUG m := M(i, i+1);
- if mib[i] != false {
- F.s("nonexistence: mib[").d(i).s("] != false").putnl();
- }
- if mii[i] != 0 {
- F.s("nonexistence: mii[").d(i).s("] != 0").putnl();
- }
- if mfi[f] != 0 {
- F.s("nonexistence: mfi[").g(f).s("] != 0").putnl();
- }
- if mif[i] != 0.0 {
- F.s("nonexistence: mif[").d(i).s("] != 0.0").putnl();
- }
- if mis[i] != `` {
- F.s("nonexistence: mis[").d(i).s("] != ``").putnl();
- }
- if msi[s] != 0 {
- F.s("nonexistence: msi[").s(s).s("] != 0").putnl();
- }
- if mss[s] != `` {
- F.s("nonexistence: mss[").s(s).s("] != ``").putnl();
- }
- if mspa[s] != nil {
- F.s("nonexistence: mspa[").s(s).s("] != ``").putnl();
- }
- if mipT[i] != nil {
- F.s("nonexistence: mipT[").d(i).s("] != nil").putnl();
- }
- if mpTi[apT[i]] != 0 {
- F.s("nonexistence: mpTi[apT[").d(i).s("]] != 0").putnl();
- }
-// if mti[t] != 0 {
-// // emit stdout <- format("haskey mti[%s] false", string(t));
-//
- if mipM[i] != nil {
- F.s("nonexistence: mipM[").d(i).s("] != nil").putnl();
- }
- }
-
// test existence with tuple check
// failed lookups yield a false value for the boolean.
for i := 0; i < count; i++ {
}
}
}
+
+ print("skipping increment test until bug060 is fixed\n");
+ return;
// tests for structured map element updates
for i := 0; i < count; i++ {