Skip to contentSkip to content
Verified credentials. On-chain. Forever.Learn more
Cover image for Apply Property-Based Testing to a Currency-Conversion Module
Code

Apply Property-Based Testing to a Currency-Conversion Module

FreeVerified credential2 weeksIntermediate

Overview

What this challenge is about.

Rewrite the conversion module in F#: use units of measure for currency types, immutable value types for amounts, no floating-point arithmetic (Decimal only). Build property tests for 12 invariants: associativity-where-allowed, monotonicity, no-precision-loss-under-round-trip, currency-conservation, fee-bound, etc. Run each property at 10,000 cases. Catalog the bugs caught (likely 3-6). Deliver F# source, FsCheck test suite, and a 6-page writeup comparing property-test coverage vs the original example-test coverage.

CredentialBlockchain-anchored
ShareableLinkedIn-ready
LanguageEnglish
PaceSelf-paced

The Brief

What you'll do, and what you'll demonstrate.

Rewrite a buggy currency-conversion module in F# and validate with property-based tests covering 12 named invariants the example-test suite missed.

Earning criteria — what you'll demonstrate

  • Use units of measure to model currency types safely
  • Identify and codify mathematical + business invariants for testing
  • Apply property-based testing to a real production module
  • Document the marginal value of property tests over example tests

Program Fit

Where this fits in your program.

Sharpens the same skills your degree expects you to demonstrate.

Skills

Skills you'll demonstrate.

Each one shows up on your verified credential.

Careers

Roles this prepares you for.

Real titles. Real skill bridges. Pick the one closest to your trajectory.

Career mappings coming soon.

One more thing

You can put a credential on your CV by Friday.