Comment

Comment by huijzer

Say we have a trivial function like this

    func below_ten()
      if 10 < x
        println(“true”)
      else
        println(“false”)
      end
    end
Now what would a test for these two paths test? It would basically be writing down the same - easy to understand logic - in a less generalized way. Good perhaps to ensure that this function doesn’t accidentally change over time but apart from that it wouldn’t add much value.
parent huijzer 5 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton