Skip to content
var CSV = require('csv');
CSV()
.from.string('foo\nbar\nbaz')
.on('record', function(row, index) {
if (index === 2) {
this.error(new Error('stop'));
}
})
.on('error', function(err) {
var CSV = require('csv');
CSV()
.from.string('foo\nbar\nbaz')
.on('record', function(row, index) {
if (index === 0) {
this.error(new Error('stop'));
}
})
.on('error', function(err) {
package com.kemga.framework;
import static org.junit.Assert.assertEquals;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

Q: Why Test?

A: Most developers spend the majority of their time not writing code but debugging and maintaining it. Unit tests are one of the best ways to minimize unnecessary time spent on both. Testing also helps document your code. Finally, we use a passing unit test suite as one of the criteria for accepting pull requests.

Q: What software is used to test?

A: Terasology uses JUnit 4 for its automated test suite. It also uses Mockito for mocking/stubbing in special situations for which a dependency is too expensive or unreliable to bring into a test suite - for example, network activity or OpenGL.

An IDE is highly encouraged for running tests, as most support JUnit. On Eclipse, for example, you can quickly run a single test by right-clicking on the test method declaration and selecting "Run As -> JUnit Test". You can give this command a shortcut key of your choice to make it even faster.

// See:
// http://gradle.1045684.n5.nabble.com/Groovy-Java-mixed-codebase-td1435484.html
// http://stackoverflow.com/questions/2572811/gradle-make-a-3rd-party-jar-available-to-local-gradle-repository
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'groovy'
sourceCompatibility = 1.6
version = '0.5.0'
#import <PhoneGap/JSON.h>
@implementation Test
-(void)foo:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options {
NSDictionary *map = [NSDictionary dictionary];
NSString *json = [map JSONRepresentation];
NSLog(@"%@", json);
}
@end
<div class="wrapper" style="overflow: auto;">
<div class="child" style="float: left;" ></div>
<div class="child" style="float: left;" ></div>
</div>
chemtab.browser.FileView.prototype.wiggle = function() {
goog.dom.classes.add(this.getElement(), 'wiggle');
};
/**
* See: http://jsfromhell.com/math/dot-line-length
*
* Distance from a point to a line or segment.
*
* @param {number} x point's x coord
* @param {number} y point's y coord
* @param {number} x0 x coord of the line's A point
* @param {number} y0 y coord of the line's A point
* @param {number} x1 x coord of the line's B point
241
-OEChem-07100913442D
67 72 0 0 1 0 999 V2000
5.3950 -3.1602 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
4.9853 -3.8822 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
5.4045 -4.6006 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
6.2342 -4.5947 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
6.6482 -3.8727 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
6.2284 -3.1565 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
Something went wrong with that request. Please try again.