Cache:...Tester(3pm)

✨ NAME ✨

Cache::BaseCacheTester β€” the abstract cache tester base class, bestie πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so listen. BaseCacheTester is the base class that hands out all the shared functionality to literally every instance of a class whose whole job is testing cache implementations. It's giving backstage crew energy β€” nobody claps for it but nothing works without it. πŸ‘‘


🌸 SYNOPSIS 🌸

Same vibe as the description, fr fr: BaseCacheTester provides functionality common to all instances of a class that will test cache implementations.

package Cache::MyCacheTester;

use vars qw( @ISA );
use Cache::BaseCacheTester;

@ISA = qw( Cache::BaseCacheTester );

That's the whole setup, no cap. You subclass it, you inherit the tester juice. ✨


πŸŽ€ METHODS πŸŽ€

  • new( $base_test_count ) β€” constructs a brand new BaseCacheTester and initializes the test count to $base_test_count. Fresh tester, fresh counter, main character moment. 🫢
  • ok( ) β€” prints a message to stdout in the form "ok $test_count" and increments the test count. Slay, it passed. βœ…
  • not_ok( $message ) β€” prints a message to stdout in the form "not ok $test_count # $message " and increments the test count. 😭 the test said no but the counter still goes up.
  • skip( $message ) β€” prints a message to stdout in the form "ok $test_count # skipped $message " and increments the test count. Not a fail, not a pass, just living its truth and skipping. πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

  • Cache::CacheTester
  • Cache::SizeAwareCacheTester

Go read those too, iykyk. πŸ’œ


πŸ’– AUTHOR πŸ’–

  • Original author: DeWitt Clinton <dewitt@unto.net>
  • Last author: $Author: dclinton $
  • Copyright (C) 2001-2003 DeWitt Clinton

And that's the whole page, bestie!! πŸŽ€ This one's from the User Contributed Perl Documentation collection, shipped with perl v5.34.0, dated 2022-06-30. Stan DeWitt Clinton, stan the test counter, and go write some passing tests. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from