test: espandi copertura a 110 test e organizza in gruppi
- Aggiunto converter_provider_test.dart (nuovo): stato iniziale, select, setGrams, result, swapDirection, reset, search - Aggiunto qr_test.dart (nuovo): buildQrPayload e parseMealPlanFromQr con round-trip e casi di errore - meal_planner_provider_test: group(), importPlan(), fallback JSON corrotto - shopping_list_provider_test: group(), addAll con aggregazione quantity, fallback JSON corrotto - shopping_item_test: campi quantity (default, copyWith, JSON round-trip) - shopping_item_tile_test: group(), visualizzazione (xN) - conversion_entry_test: caso limite yieldFactor=0 - meal_card_test: group() - Rimosso widget_test.dart (boilerplate obsoleto) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -61,5 +61,14 @@ void main() {
|
||||
expect(entry.rawToCooked(0), 0.0);
|
||||
expect(entry.cookedToRaw(0), 0.0);
|
||||
});
|
||||
|
||||
test('yield = 0: rawToCooked restituisce 0', () {
|
||||
const entry = ConversionEntry(
|
||||
food: 'test',
|
||||
method: 'test',
|
||||
yieldFactor: 0.0,
|
||||
);
|
||||
expect(entry.rawToCooked(100), 0.0);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user