[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master eca1c31 3/5: Diagnose 7702 q table zero as a
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master eca1c31 3/5: Diagnose 7702 q table zero as a problem |
Date: |
Thu, 6 Jun 2019 08:24:17 -0400 (EDT) |
branch: master
commit eca1c319c98f4182a5015f9fb5b3c32130d47ea3
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Diagnose 7702 q table zero as a problem
Previously, the deliberately-invalid table number zero was silently
skipped--i.e., treated as presumptively valid. It's a self-limiting
problem, because it prevents generating an illustration. However,
just such a latent problem has existed in production for almost two
decades. Now the product verifier identifies it.
---
verify_products.cpp | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/verify_products.cpp b/verify_products.cpp
index ab3213e..86b9524 100644
--- a/verify_products.cpp
+++ b/verify_products.cpp
@@ -62,12 +62,22 @@ void verify_one_cell
auto const t = db.query<int >(DB_Irc7702QTable);
auto const axis_g = db.query<bool >(DB_Irc7702QAxisGender);
auto const axis_s = db.query<bool >(DB_Irc7702QAxisSmoking);
- if
- ( 0 == t
- || (!axis_g && "Unisex" != gender)
- || (!axis_s && "Unismoke" != smoking)
- )
+
+ if((!axis_g && "Unisex" != gender) || (!axis_s && "Unismoke" != smoking))
+ {
+ std::cout << " skipping " << gender << ' ' << smoking << std::endl;
+ return;
+ }
+
+ if(0 == t)
{
+ std::cout
+ << "7702 q PROBLEM: " << product_name
+ << " nonexistent table zero"
+ << ' ' << gender
+ << ' ' << smoking
+ << std::endl
+ ;
return;
}
- [lmi-commits] [lmi] master updated (ede9f42 -> 649e05f), Greg Chicares, 2019/06/06
- [lmi-commits] [lmi] master 2081761 1/5: Add missing graphics to fardels, Greg Chicares, 2019/06/06
- [lmi-commits] [lmi] master eca1c31 3/5: Diagnose 7702 q table zero as a problem,
Greg Chicares <=
- [lmi-commits] [lmi] master d4eeaab 2/5: Add commented-out deliberate defects, to test product verifier, Greg Chicares, 2019/06/06
- [lmi-commits] [lmi] master b0e9416 4/5: Record a negative experiment, Greg Chicares, 2019/06/06
- [lmi-commits] [lmi] master 649e05f 5/5: Revert "Record a negative experiment", Greg Chicares, 2019/06/06