Testing tip: Write your test modules like so for a smaller release binary

Let's say you have a test module which looks like this:


using Toybox.Test;
import Toybox.Lang;
using Toybox.System as Sys;

module TestSomeModule {

  (:test)
  function testThing(logger) {
    // your test(s) here
    return true;
  }
}

Rewrite this piece of code to:

(:test)
module TestSomeModule {

using Toybox.Test;
import Toybox.Lang;
using Toybox.System as Sys;

  (:test)
  function testThing(logger) {
    // your test(s) here
    return true;
  }
}

This will make your release build smaller, not by a lot. I went from 27132 to 26652 bytes with 10 testfiles.