Skip to content

Instantly share code, notes, and snippets.

View bhelyer's full-sized avatar

Bernard Helyer bhelyer

  • Auckland, New Zealand
View GitHub Profile
#include <chrono>
#include <string>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <iostream>
#include <filesystem>
using namespace std;
using namespace chrono;
using namespace filesystem;
PROPOSAL VOLT_UNITTEST: UNITTEST KEYWORD IMPLEMENTATION & SEMANTICS
VERSION 0.1
ABSTRACT
Volt inherited the 'unittest' keyword from D. Currently, the unittest
keyword is followed by a block of code. Nothing is done with this code,
and the keyword is inert.
The concept of language support for unit testing is not without merit.
module test;
extern (C) fn getValue() i32 {
x := 2;
x++;
return x;
}
fn main() i32 {
return getValue();
module rr.ui.gl;
import core = core.exception;
import io = watt.io;
import file = watt.io.file;
import conv = watt.conv;
import amp.sdl2;
import amp.gl;
import amp.gl.loader;
module main;
import core.exception : Exception;
class OurException : Exception {
val: i32;
this(val: i32) {
this.val = val;
super(new "error code: ${val}");
module main;
interface IStack!(T)
{
@property fn length() size_t;
fn pop() i32;
fn push(T);
}
// Templated class implementing template.
module main;
import io = watt.io;
class LinkedList!(T)
{
private:
mData: T;
mNext: LinkedList;
module main;
import io = watt.io;
import http = watt.http;
enum Base = "digitalmars.com";
enum Child = "bibliography.html";
fn main() i32
{
module get;
enum V = 10;
fn getV!(T)() T
{
return V;
}
# Version should be set correctly.
# Move version setting code elsewhere.
# Create a VersionSet on the server
# Use everywhere a VersionSet is created in VLS
# Create a test for windows completion.
### Fix completing from core.c.windows.
# Add a test for name completion of public imports.
# Analyse pathTree usage
# Ensure current is never null in get
# Add a test for that.