Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
algernon the zellij stan
@algernon@come-from.mad-scientist.club  ·  activity timestamp 3 months ago

Today, I'm writing tests. Originally, I planned to write a bunch of tests in Rust to exercise the request handlers, but that felt like a huge pain in the backside, and would've involved a lot of repetition and boilerplate.

Then, I figured: I'll write the tests in #Roto and #Lua! Test the things from that side. Much less boilerplate, but still a lot of repetition.

Instead, I'll be writing a test suite to verify the decisions of a request handler. I'll run it for both engines, #Roto and #Lua. I will still have to write the scripts twice, but I will only write the verification once.

  • Copy link
  • Flag this post
  • Block
algernon the zellij stan
@algernon@come-from.mad-scientist.club replied  ·  activity timestamp 3 months ago

Looking at the result, I think this was the right approach.

As a neat side-effect, the iocaine repo now contains a few Roto & Lua examples. Not very complex ones, but they both exercise almost everything the scripting environment can do.

  • Copy link
  • Flag this comment
  • Block
algernon the zellij stan
@algernon@come-from.mad-scientist.club replied  ·  activity timestamp 3 months ago

I find some of the tests funny, too. Some subtle humour hidden in there.

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.1 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login