Skip to main content

72 docs tagged with "reference"

View All Tags

Cgreen

Unit tests for RISC-V are written in C with Cgreen while the solution file is in assembly.

Community Moderation Tools

Moderators are a group of users selected to support other users with handling problems related to content and the community. They have access to tools and features not available to regular users, which can be used to solve problems reported by community members. In particular, moderators can:

Criterion

The Criterion testing framework is available in its Github repository. Reference for the Criterion API can be found here//criterion.readthedocs.io/en/master/intro.html.

Curation Guidelines

This set of pages contains guidelines for reviewers to help them establish whether reviewed kata or translations adhere to the community's quality standards.

General Kata Coding Guidelines

Coding guidelines can be a controversial topic for programmers. Programmers like them, and programmers hate them. Programmers fight for them, and they fight against them. Coding guidelines can be very helpful, but can be also very difficult to define, establish, follow, and enforce.

JUnit

You can use JUnit 4 or 5 in Codewars. 5 offers nesting, pretty name display and multiple test classes.

Kata Authoring Guidelines

This article contains a set of guidelines, which can be used by authors to create good, enjoyable, high-quality kata. They were collected to help ensure that kata are of sufficient quality and users' experience will be as good as possible.

Kata Editor

This page is a stub, please consider contributing to it.

Kata Trainer

The kata trainer is the interface you're presented when you click "Train" on a kata. It is here that you write your solution, run tests and attempt to complete the kata. Since this is where you'll be spending the majority of your time, it is recommended that you familiarize yourself with the interface and its functionality. That way, you can focus entirely on solving the kata.

lc-test

To run tests for Lambda Calculus programs, Codewars uses a custom compiling and testing framework, published and available in this GitHub repository.

PHPUnit

All PHPUnit tests start with a subclass of TestCase. You can then add one or more test case methods to that class, each of which must be public and start with test. In Codewars' PHP versions 7.4+, PHPUnit requires the name of the test class to end with Test.

Python Codewars Test Framework

To run Python tests, Codewars currently uses a custom test framework, published and available in this GitHub repository.

RSpec

Shell can be tested with Ruby's RSpec library which runs the solution shell script as a subprocess. The runshell(args true) function is provided to facilitate this. Calling runshell(2, 3, 4) effectively runs bash -c $(cat solution.sh) 2 3 4 and returns the script's stdout as a string.

ScalaTest

Basic Setup (Scala 3.0/ScalaTest 3.2)

testest

To run Factor tests, Codewars currently uses a custom test vocabulary, published and available in this GitHub repository.

Translation Authoring Guidelines

This article contains a set of guidelines, which can be used by translators to create good translations to existing kata. They were collected to help ensure that translations are of sufficient quality and users' experience will be as good as possible.

Writing a Kata Description

The kata description, created by the kata author, is a crucial part of every kata, presenting the task and all requirements to a user attempting it. Descriptions should be written with special attention. Unclear descriptions are a common cause of a poor user experience with a kata. To ensure the quality of the kata, its description should conform to the guidelines presented below.

Writing a Reference Solution

On this page, the term "Reference Solution" refers to a separate code snippet provided by a kata author or translator, which is used by Codewars to verify the correctness of the kata while it's being published.

Writing Preloaded Code

The preloaded code snippet, created by the kata author or translator, can be used to reduce boilerplate code, but can cause problems when used incorrectly. To ensure the quality of the kata, it should conform to a set of guidelines presented below.

Writing Sample Tests

Sample tests are a part of every kata which is often underappreciated by both kata authors and solvers. Bad sample tests can cause a lot of frustration, while a good suite of them often increases the overall satisfaction of users from solving the kata. To make sample tests as good as possible, follow the guidelines collected below.

Writing Submission Tests

This article contains a set of guidelines for kata authors or translators to create good test suites for their kata. They were collected to help ensure that kata, translations and their test suites are of sufficient quality so that users' experience with tests will be as good as possible.