1187
1187
{ "input": null, "query": ["gt", "20", "3"], "output": false }
1188
1188
]
1189
1189
},
1190
+
{
1191
+
"category": "gt",
1192
+
"description": "should calculate greater than for booleans",
1193
+
"tests": [
1194
+
{ "input": null, "query": ["gt", true, true], "output": false },
1195
+
{ "input": null, "query": ["gt", true, false], "output": true },
1196
+
{ "input": null, "query": ["gt", false, true], "output": false },
1197
+
{ "input": null, "query": ["gt", false, false], "output": false }
1198
+
]
1199
+
},
1190
1200
{
1191
1201
"category": "gt",
1192
1202
"description": "should throw when calculating greater than with mixed data types",
1193
1203
"tests": [
1194
1204
{
1195
1205
"input": null,
1196
1206
"query": ["gt", "3", 2],
1197
-
"throws": "Two numbers or two strings expected"
1207
+
"throws": "Two numbers, strings, or booleans expected"
1198
1208
}
1199
1209
]
1200
1210
},
1205
1215
{
1206
1216
"input": null,
1207
1217
"query": ["gt", 2, ["array", 1, 2, 3]],
1208
-
"throws": "Two numbers or two strings expected"
1218
+
"throws": "Two numbers, strings, or booleans expected"
1209
1219
},
1210
1220
{
1211
1221
"input": null,
1212
1222
"query": ["gt", ["array", 1, 2, 4], ["array", 1, 2, 3]],
1213
-
"throws": "Two numbers or two strings expected"
1223
+
"throws": "Two numbers, strings, or booleans expected"
1214
1224
},
1215
1225
{
1216
1226
"input": null,
1217
1227
"query": ["gt", 2, ["object", { "a": 1 }]],
1218
-
"throws": "Two numbers or two strings expected"
1228
+
"throws": "Two numbers, strings, or booleans expected"
1219
1229
}
1220
1230
]
1221
1231
},
1252
1262
{ "input": null, "query": ["gte", "20", "3"], "output": false }
1253
1263
]
1254
1264
},
1265
+
{
1266
+
"category": "gte",
1267
+
"description": "should calculate greater than or equal for booleans",
1268
+
"tests": [
1269
+
{ "input": null, "query": ["gte", true, true], "output": true },
1270
+
{ "input": null, "query": ["gte", true, false], "output": true },
1271
+
{ "input": null, "query": ["gte", false, true], "output": false },
1272
+
{ "input": null, "query": ["gte", false, false], "output": true }
1273
+
]
1274
+
},
1255
1275
{
1256
1276
"category": "gte",
1257
1277
"description": "should throw when calculating greater than or equal to with mixed data types",
1258
1278
"tests": [
1259
1279
{
1260
1280
"input": null,
1261
1281
"query": ["gte", "3", 2],
1262
-
"throws": "Two numbers or two strings expected"
1282
+
"throws": "Two numbers, strings, or booleans expected"
1263
1283
}
1264
1284
]
1265
1285
},
1270
1290
{
1271
1291
"input": null,
1272
1292
"query": ["gte", 2, ["array", 1, 2, 3]],
1273
-
"throws": "Two numbers or two strings expected"
1293
+
"throws": "Two numbers, strings, or booleans expected"
1274
1294
},
1275
1295
{
1276
1296
"input": null,
1277
1297
"query": ["gte", ["array", 1, 2, 4], ["array", 1, 2, 3]],
1278
-
"throws": "Two numbers or two strings expected"
1298
+
"throws": "Two numbers, strings, or booleans expected"
1279
1299
},
1280
1300
{
1281
1301
"input": null,
1282
1302
"query": ["gte", 2, ["object", { "a": 1 }]],
1283
-
"throws": "Two numbers or two strings expected"
1303
+
"throws": "Two numbers, strings, or booleans expected"
1284
1304
}
1285
1305
]
1286
1306
},
1317
1337
{ "input": null, "query": ["lt", "3", "20"], "output": false }
1318
1338
]
1319
1339
},
1340
+
{
1341
+
"category": "lt",
1342
+
"description": "should calculate less than for booleans",
1343
+
"tests": [
1344
+
{ "input": null, "query": ["lt", true, true], "output": false },
1345
+
{ "input": null, "query": ["lt", true, false], "output": false },
1346
+
{ "input": null, "query": ["lt", false, true], "output": true },
1347
+
{ "input": null, "query": ["lt", false, false], "output": false }
1348
+
]
1349
+
},
1320
1350
{
1321
1351
"category": "lt",
1322
1352
"description": "should throw when calculating less than with mixed data types",
1323
1353
"tests": [
1324
1354
{
1325
1355
"input": null,
1326
1356
"query": ["lt", 2, "3"],
1327
-
"throws": "Two numbers or two strings expected"
1357
+
"throws": "Two numbers, strings, or booleans expected"
1328
1358
}
1329
1359
]
1330
1360
},
1335
1365
{
1336
1366
"input": null,
1337
1367
"query": ["lt", 2, ["array", 1, 2, 3]],
1338
-
"throws": "Two numbers or two strings expected"
1368
+
"throws": "Two numbers, strings, or booleans expected"
1339
1369
},
1340
1370
{
1341
1371
"input": null,
1342
1372
"query": ["lt", ["array", 1, 2, 4], ["array", 1, 2, 3]],
1343
-
"throws": "Two numbers or two strings expected"
1373
+
"throws": "Two numbers, strings, or booleans expected"
1344
1374
},
1345
1375
{
1346
1376
"input": null,
1347
1377
"query": ["lt", 2, ["object", { "a": 1 }]],
1348
-
"throws": "Two numbers or two strings expected"
1378
+
"throws": "Two numbers, strings, or booleans expected"
1349
1379
}
1350
1380
]
1351
1381
},
1386
1416
{ "input": null, "query": ["lte", "3", "20"], "output": false }
1387
1417
]
1388
1418
},
1419
+
{
1420
+
"category": "lte",
1421
+
"description": "should calculate less than or equal for booleans",
1422
+
"tests": [
1423
+
{ "input": null, "query": ["lte", true, true], "output": true },
1424
+
{ "input": null, "query": ["lte", true, false], "output": false },
1425
+
{ "input": null, "query": ["lte", false, true], "output": true },
1426
+
{ "input": null, "query": ["lte", false, false], "output": true }
1427
+
]
1428
+
},
1389
1429
{
1390
1430
"category": "lte",
1391
1431
"description": "should throw when calculating less than or equal to with mixed data types",
1392
1432
"tests": [
1393
1433
{
1394
1434
"input": null,
1395
1435
"query": ["lte", "3", 2],
1396
-
"throws": "Two numbers or two strings expected"
1436
+
"throws": "Two numbers, strings, or booleans expected"
1397
1437
}
1398
1438
]
1399
1439
},
1404
1444
{
1405
1445
"input": null,
1406
1446
"query": ["lte", 2, ["array", 1, 2, 3]],
1407
-
"throws": "Two numbers or two strings expected"
1447
+
"throws": "Two numbers, strings, or booleans expected"
1408
1448
},
1409
1449
{
1410
1450
"input": null,
1411
1451
"query": ["lte", ["array", 1, 2, 4], ["array", 1, 2, 3]],
1412
-
"throws": "Two numbers or two strings expected"
1452
+
"throws": "Two numbers, strings, or booleans expected"
1413
1453
},
1414
1454
{
1415
1455
"input": null,
1416
1456
"query": ["lte", 2, ["object", { "a": 1 }]],
1417
-
"throws": "Two numbers or two strings expected"
1457
+
"throws": "Two numbers, strings, or booleans expected"
1418
1458
}
1419
1459
]
1420
1460
},
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4