List of commits:
Subject Hash Author Date (UTC)
rm test/plank 7b1ad7a44ce2e3b2abb8024c14310099f5597a89 mbusenitz 2015-09-26 10:37:05
gitignore' 5bd4c2c8a9bc1befbec9de0d2487690e1a0b0fea mbusenitz 2015-09-26 10:36:39
cleanup be3e84988b097998550d5490fbbaec76670f5004 mbusenitz 2015-08-17 21:22:11
Squashed 'test/plank/' changes from 3d66229..4e4be36 81a33cac0e8e98f8435d975f81c6ae354a013455 mbusenitz 2015-08-17 21:21:33
m_.json dee0651fef2f9d675defffc3b9d34ccc6f213b64 mbusenitz 2015-08-01 04:50:41
Squashed 'test/plank/' content from commit 3d66229 67457e7330a167d3b1266b7e6cce413a274bc9b8 mbusenitz 2015-08-01 04:50:16
test passing on gcc fa1a492a81166b954501cd87d41f7eebc711b9ee Ubuntu 2015-07-25 05:29:39
ignore 5d88a4109278fbbe8b2b4155b0f51fbf002b8ed7 mbusenitz 2015-07-21 10:42:09
remove plank 72b9357832df405e498da540a30b1a19e245906b mbusenitz 2015-07-21 10:41:38
fix build 9550d26ccb8f60c9257bb928aeca58ed1d15a29f mbusenitz 2015-02-28 23:51:26
master rework batch 6f96134102be0e5a3dc2d9745640b98edc5d4e4d mbusenitz 2015-02-28 23:09:16
fix traverse destructive 2c3839ec7a709d3412e7f5b3e5acc3ed5d900e97 mbusenitz 2015-02-28 18:25:42
master rework bfd068cc2513e275bfe31ca4a4075b64858d98b2 mbusenitz 2015-02-28 13:15:49
cleanup 243f014fbc1cf0e0b88dadc69daec250406e219c mbusenitz 2015-02-28 11:53:29
cleanup 849260db25b72640b9b8cb35c3170e4ef14fe9bb mbusenitz 2015-02-28 11:44:40
master rework process interface" 6bd50518b575f162486d7252bd1f29d628325f26 mbusenitz 2015-02-28 11:43:46
test args 523b7174ede20ae385ccc131738a32d6de3a412e mbusenitz 2015-02-27 05:31:55
check_traverse_while_traverse 13fd698a0986a46dbde2f886435cf0313679640f mbusenitz 2015-02-27 05:17:49
fix test 0d8478c8650285983253d655b5254701a6d9302b mbusenitz 2015-02-26 21:03:12
batch test e6f780a6e37191ea0ed22fe35fff421a770860bc mbusenitz 2015-02-26 20:39:03
Commit 7b1ad7a44ce2e3b2abb8024c14310099f5597a89 - rm test/plank
Author: mbusenitz
Author date (UTC): 2015-09-26 10:37
Committer name: mbusenitz
Committer date (UTC): 2015-09-26 10:37
Parent(s): 5bd4c2c8a9bc1befbec9de0d2487690e1a0b0fea
Signer:
Signing key:
Signing status: N
Tree: 6a8004c501223d39e11a35c9075ab1a485c14122
File Lines added Lines deleted
test/plank/.gitignore 0 5
test/plank/README.md 0 2
test/plank/bin/base.js 0 161
test/plank/bin/logic.js 0 122
test/plank/bin/printer.js 0 36
test/plank/bin/test.js 0 108
test/plank/def/cpp11-gcc.gypi 0 10
test/plank/def/cpp11.gypi 0 6
test/plank/def/mac-targets.gypi 0 30
test/plank/def/opengl.gypi 0 18
test/plank/def/plank.gypi 0 28
test/plank/package.json 0 27
test/plank/src/assert.cpp 0 79
test/plank/src/assert.h 0 112
test/plank/src/assert.hxx 0 31
test/plank/src/test.h 0 10
test/plank/test/plank 0 1
test/plank/test/src/main.cpp 0 14
test/plank/test/src/main.mm 0 13
test/plank/test/test.gyp 0 18
test/plank/test/test.js 0 24
File test/plank/.gitignore deleted (index 9bdfb3f..0000000)
1 .DS_Store
2 build/
3 node_modules/
4 lib/
5 build.log
File test/plank/README.md deleted (index ebdca1e..0000000)
1 plank
2 https://github.com/mucbuc/plank/wiki/quick-guide
File test/plank/bin/base.js deleted (index 30ecf53..0000000)
1
2 var assert = require( 'assert' )
3 , path = require( 'path' )
4 , cp = require( 'child_process' )
5 , copy = require( 'fs-extra' ).copy
6 , fs = require( 'graceful-fs' )
7 , Printer = require( './printer' );
8
9 assert( typeof copy === 'function' );
10
11 function Base(program) {
12
13 this.readSuites = function(suite, cb) {
14 fs.readFile( suite, function(err, data) {
15 if (err) throw err;
16 cb( JSON.parse( data.toString() ).tests );
17 });
18 };
19
20 this.generate = function( o, cb ) {
21
22 assert( o.hasOwnProperty( 'output' ) );
23 assert( o.hasOwnProperty( 'testDir' ) );
24 assert( o.hasOwnProperty( 'defFile' ) );
25
26 makePathIfNone(o.output, function() {
27
28 var include = program.gcc ? 'plank/def/cpp11-gcc.gypi' : 'plank/def/cpp11.gypi'
29 , args = [
30 o.defFile,
31 '--depth=' + (program.gcc ? './' : '.'),
32 '--generator-output=' + o.output,
33 '--include=' + include
34 ];
35
36 if (program.gcc) {
37 args.push( '--format=make' );
38 }
39
40 console.log( args );
41
42 cp.spawn(
43 'gyp',
44 args, {
45 stdio: 'inherit',
46 cwd: o.testDir
47 })
48 .on( 'close', function( code ) {
49 cb( code, o.output );
50 });
51 });
52
53 function makePathIfNone( path, cb ) {
54 fs.exists(path, function(exists) {
55 if (exists)
56 cb();
57 else
58 fs.mkdir( path, [], cb );
59 });
60 }
61 };
62
63 this.traverse = function( o, cb ) {
64 fs.readdir( o.testDir, function( err, files ) {
65 files.forEach( function( file ) {
66 if (path.extname(file) == '.gyp') {
67 cb( file );
68 }
69 } );
70 } );
71 };
72
73 this.build = function( o, cb ) {
74
75 readTargetName( o.defFile, o.testDir, function( targetName ) {
76
77 var child;
78 if (program.gcc) {
79 child = cp.spawn(
80 'make',
81 [ '-j'],
82 {
83 stdio: 'inherit',
84 cwd: o.output
85 });
86 }
87 else {
88
89 var args = [
90 "-project",
91 path.join( o.output, targetName + '.xcodeproj' )
92 ];
93
94 console.log( args );
95
96 child = cp.spawn(
97 'xcodebuild',
98 args, {
99 cwd: o.output,
100 stdio: 'inherit'
101 } );
102 }
103
104 child.on( 'close', function( code ) {
105 o['target'] = targetName;
106 o['exitCode'] = code;
107 cb( o );
108 } );
109 } );
110
111 function readTargetName(defFile, testDir, cb) {
112 var defPath = path.join( testDir, defFile );
113 fs.readFile( defPath, function( err, data ) {
114 if (err) {
115 Printer.cursor.red();
116 process.stdout.write( defFile + ': ' );
117 Printer.cursor.reset();
118 console.log( err );
119 }
120 else {
121 var matches = data.toString().match( /'target_name'\s*:\s*'(.*)'/ )
122 if (matches) {
123 cb( matches[1] );
124 }
125 }
126 } );
127 }
128 };
129
130 this.run = function( o, cb ) {
131 var execPath;
132
133 if (program.gcc) {
134 o.testDir = path.join( o.testDir, 'out' );
135 execPath = path.join( o.output, 'out/Test', o.target );
136 }
137 else
138 execPath = path.join( o.output, 'Test', o.target );
139
140 cp.spawn(
141 execPath,
142 [ 'http://localhost:3000' ], {
143 stdio: 'pipe'
144 })
145 .on( 'error', function( error ) {
146 console.log( error );
147 })
148 .on( 'close', function( code ) {
149 cb( code );
150 //server.kill();
151 })
152 .stdout.on( 'data', function( data ) {
153 Printer.cursor.blue();
154 process.stdout.write( o.defFile + ': ' );
155 Printer.cursor.reset();
156 console.log( data.toString() );
157 });
158 };
159 }
160
161 module.exports = Base;
File test/plank/bin/logic.js deleted (index 553e705..0000000)
1 var assert = require( 'assert' )
2 , Promise = require( 'promise' )
3 , Printer = require( './printer' )
4 , fs = require( 'graceful-fs' )
5 , summary = '';
6
7 process.on( 'exit', function() {
8 console.log( summary );
9 });
10
11 function Logic(base) {
12
13 this.traverse = function(o) {
14 return new Promise(function(resolve, reject) {
15 try {
16 fs.exists( o.testDir, function(exists) {
17 if (exists) {
18 resolve( o );
19 }
20 else {
21 Printer.cursor.red();
22 process.stdout.write( 'invalid test definition path: ' + o.testDir );
23 Printer.cursor.reset();
24 reject();
25 }
26 });
27 }
28 catch(e)
29 {
30 Printer.printError( e );
31 summarize( e, o );
32 throw(e);
33 }
34 });
35
36 };
37
38 this.generate = function(o) {
39 return new Promise(function(resolve, reject) {
40 Printer.begin( o.defFile, 'generate' );
41 try {
42 base.generate( o, function( exitCode, buildDir){
43 //o['buildDir'] = buildDir;
44 o['testDir'] = o.testDir;
45 if (!exitCode) {
46 Printer.finishGreen( o.defFile, 'generate' );
47 resolve(o);
48 }
49 else {
50 Printer.finishRed( o.defFile ) ;
51 reject(o);
52 }
53 });
54 }
55 catch( e )
56 {
57 Printer.printError( e );
58 summarize( e, o );
59 throw( e );
60 }
61 });
62 };
63
64 this.build = function(o) {
65 return new Promise( function(resolve, reject) {
66 Printer.begin( o.defFile, 'build' );
67
68 try {
69 base.build( o, function( o ) {
70 if (!o.exitCode) {
71 Printer.finishGreen( o.defFile );
72 resolve( o );
73 }
74 else {
75 Printer.finishRed( o.defFile );
76 reject(o);
77 }
78 });
79 }
80 catch(e)
81 {
82 Printer.printError( e );
83 summarize( e, o );
84 throw e;
85 }
86 });
87 };
88
89 this.run = function(o) {
90 return new Promise(function(resolve, reject) {
91 Printer.begin( o.defFile, 'run' );
92 try {
93 base.run( o, function(exitCode) {
94 o['exitCode'] = exitCode;
95 if (!exitCode) {
96 Printer.finishGreen( o.defFile );
97 resolve(o);
98 summarize( " passed", o );
99 }
100 else {
101 Printer.finishRed( o.defFile ) ;
102 reject(o);
103 }
104 });
105 }
106 catch(e) {
107 Printer.printError(e);
108 summarize( e, o );
109 throw e;
110 }
111 });
112 };
113 };
114
115 function summarize(e, o) {
116 if (typeof e !== 'string') {
117 e = e.toString();
118 }
119 summary += o.testDir + e + '\n';
120 }
121
122 module.exports = Logic;
File test/plank/bin/printer.js deleted (index f9dc662..0000000)
1 var ansi = require( 'ansi' )
2 , cursor = ansi( process.stdout )
3 , summary = '';
4
5 var Printer = {
6
7 cursor: cursor,
8
9 begin: function( msg1, msg2 ) {
10 cursor.green();
11 process.stdout.write( msg1 + ': ' );
12 cursor.reset();
13 console.log( msg2 );
14 console.time( msg1 );
15 },
16
17 finishGreen: function( msg1 ) {
18 cursor.green();
19 console.timeEnd( msg1 );
20 cursor.reset();
21 },
22
23 finishRed: function( msg1 ) {
24 cursor.red();
25 console.timeEnd( msg1 );
26 cursor.reset();
27 },
28
29 printError: function( msg ) {
30 cursor.red();
31 console.log( msg );
32 cursor.reset();
33 }
34 };
35
36 module.exports = Printer;
File test/plank/bin/test.js deleted (index 74d4491..0000000)
1 #!/usr/bin/env node
2
3 var assert = require( 'assert' )
4 , events = require( 'events' )
5 , path = require( 'path' )
6 , fs = require( 'graceful-fs' )
7 , program = require( 'commander' )
8 , Base = require( './base' )
9 , Logic = require( './logic' )
10 , DateTime = require( 'date-time-string' );
11
12 assert( typeof Logic !== 'undefined' );
13
14 program
15 .version( '0.0.0' )
16 .option( '-p, --path [path]', 'test path' )
17 .option( '-o, --output [path]', 'build output' )
18 .option( '-g, --gcc', 'use gcc compiler' )
19 .option( '-s, --suite [path]', 'suite json' )
20 .parse( process.argv );
21
22
23 program.path = program.path ? path.join( process.cwd(), program.path ) : process.cwd();
24
25 (function() {
26 var base = new Base(program)
27 , logic = new Logic( base )
28 , emitter = new events.EventEmitter;
29
30 emitter.on( 'run', function( o ) {
31 logic.run( o )
32 .then( function() {
33 log('passed');
34 emitter.emit('done');
35 })
36 .catch( function() {
37 log('failed (test)');
38 emitter.emit('done');
39 });
40 });
41
42 emitter.on( 'build', function( o ) {
43 logic.build( o )
44 .then( function( o ) {
45 emitter.emit( 'run', o );
46 })
47 .catch( function() {
48 log('failed (build)');
49 });
50 });
51
52 emitter.on( 'generate', function( o ) {
53 logic.generate( o )
54 .then( function( o ) {
55 emitter.emit( 'build', o );
56 })
57 .catch( function() {
58 log('failed (generate)');
59 });
60 });
61
62 emitter.on( 'traverse', function( o ) {
63 logic.traverse( o ).then( function( o ) {
64 base.traverse( o, function(defFile) {
65 o['defFile'] = defFile;
66 emitter.emit( 'generate', o );
67 });
68 });
69 });
70
71 if (!program.suite) {
72 program.output = path.join( program.path, program.output ? program.output : 'build' );
73
74 emitter.emit( 'traverse', {
75 testDir: program.path,
76 output: program.output,
77 } );
78 }
79 else {
80 base.readSuites( program.suite, function( suites ) {
81
82 var index = 0;
83 emitter.on( 'done', testNextSuite );
84 testNextSuite();
85
86 function testNextSuite() {
87 if (index < suites.length) {
88 var suite = path.join( process.cwd(), suites[index] );
89 var output = path.join( suite, program.output ? program.output : 'build' );
90 emitter.emit( 'traverse', {
91 testDir: suite,
92 output: output
93 } );
94 ++index;
95 }
96 }
97
98 });
99 }
100
101 function log(msg) {
102 var tmp = DateTime.toDateTimeString() + ": " + msg + '\n';
103 console.log( tmp );
104 fs.appendFile( 'build.log', tmp, function(err) {
105 if (err) throw err;
106 } );
107 }
108 })();
File test/plank/def/cpp11-gcc.gypi deleted (index 9d42827..0000000)
1 {
2 'target_defaults': {
3 'cflags': [ '-std=c++11' ],
4 'ldflags': [ '-pthread' ],
5 },
6 'make_global_settings': [
7 ['CC', '/usr/bin/g++'],
8 ['CXX', '/usr/bin/g++'],
9 ],
10 }
File test/plank/def/cpp11.gypi deleted (index 86d1f53..0000000)
1 {
2 'target_defaults': {
3 'cflags': [ '-std=c++11', '-stdlib=libc++' ],
4 'ldflags': [ '-stdlib=libc++' ],
5 }, #target_defaults
6 }
File test/plank/def/mac-targets.gypi deleted (index ce9c6ee..0000000)
1 {
2 'targets': [
3 {
4 'conditions': [
5 [
6 'OS=="mac"', {
7 'xcode_settings': {
8 'OTHER_CPLUSPLUSFLAGS' : ['-std=c++11','-stdlib=libc++'],
9 'OTHER_LDFLAGS': ['-stdlib=libc++'],
10 }#xcode-settings
11 } #mac
12 ],
13 [ 'OS=="ios"', {
14 'mac_bundle': 1,
15 'xcode_settings': {
16 'SDKROOT': 'iphoneos',
17 'TARGETED_DEVICE_FAMILY': '1,2',
18 'CODE_SIGN_IDENTITY': 'iPhone Developer',
19 'IPHONEOS_DEPLOYMENT_TARGET': '5.0',
20 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT)',
21 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11',
22 'CLANG_CXX_LIBRARY': 'libc++',
23 'INFOPLIST_FILE': 'test-Info.plist'
24 } #xcode_settings
25 } #ios
26 ],
27 ] #conditions
28 }
29 ], #targets
30 }
File test/plank/def/opengl.gypi deleted (index f6c9b0e..0000000)
1 {
2 'target_defaults': {
3 'conditions': [
4 [
5 'OS=="mac"', {
6 'link_settings': {
7 'libraries': [
8 'AppKit.framework',
9 'Foundation.framework',
10 'OpenGL.framework',
11 'QuartzCore.framework',
12 ]
13 }
14 }
15 ]
16 ]
17 }
18 }
File test/plank/def/plank.gypi deleted (index 902cdc2..0000000)
1 {
2 'includes':[
3 'mac-targets.gypi'
4 ],
5 'target_defaults': {
6 'default_configuration': 'Test',
7 'configurations':{
8 'Release': {
9 'defines': [
10 'NDEBUG',
11 ],
12 },
13 'Debug': {
14 },
15 'Test': {
16 'defines': [
17 'TARGET_TEST=1'
18 ],
19 }
20 },
21 'sources': [
22 '../src/assert.cpp',
23 '../src/assert.h',
24 '../src/assert.hxx',
25 '../src/test.h',
26 ]
27 }
28 }
File test/plank/package.json deleted (index 9b0e86b..0000000)
1 {
2 "name": "plank",
3 "version": "0.0.0",
4 "description": "cpm",
5 "main": "none",
6 "directories": {
7 "test": "test"
8 },
9 "scripts": {
10 "test": "node test/test.js"
11 },
12 "repository": {
13 "type": "git",
14 "url": "https:///github.com/mucbuc/plank.git"
15 },
16 "author": "mbusenitz@gmail.com",
17 "license": "GNU",
18 "dependencies": {
19 "graceful-fs": "*",
20 "fs-extra": "*",
21 "ansi": "*",
22 "commander": "*",
23 "promise": "*",
24 "expector": "*",
25 "date-time-string": "*"
26 }
27 }
File test/plank/src/assert.cpp deleted (index 9f5b85c..0000000)
1 #include "assert.h"
2
3 #undef SMART_ASSERT_A
4 #undef SMART_ASSERT_B
5 #undef SMART_ASSERT_OP
6 #undef SMART_ASSERT
7
8 #ifndef NDEBUG
9
10 /////////////////////////////////////////////////////////////////////////////////////////////
11 // asserter_t
12 /////////////////////////////////////////////////////////////////////////////////////////////
13 asserter_t::asserter_t(bool value)
14 : SMART_ASSERT_A( * this )
15 , SMART_ASSERT_B( * this )
16 , m_value( value )
17 {}
18
19 /////////////////////////////////////////////////////////////////////////////////////////////
20 bool asserter_t::can_handle() const
21 {
22 return m_value;
23 }
24
25 /////////////////////////////////////////////////////////////////////////////////////////////
26 const asserter_t & asserter_t::print_message(const char * file, int line, const char * function, const char * message) const
27 {
28 static const char * code_red( "\x1b[31m" );
29 static const char * code_reset( "\x1b[39;49m" );
30
31 using namespace std;
32
33 if (m_value)
34 {
35 cout << "assertion passed: " << message << endl
36 << "file: " << file << endl
37 << "line: " << line << endl
38 << "function: " << function << endl;
39 }
40 else
41 {
42 cout << code_red
43 << "assertion failed: " << message << endl
44 << "file: " << file << endl
45 << "line: " << line << endl
46 << "function: " << function
47 << code_reset << endl;
48 }
49 return * this;
50 }
51
52 /////////////////////////////////////////////////////////////////////////////////////////////
53 const asserter_t asserter_t::make_asserter(bool value)
54 { return asserter_t(value); }
55
56 /////////////////////////////////////////////////////////////////////////////////////////////
57 const asserter_message_out asserter_t::make_asserter(bool value, const char * message)
58 { return asserter_message_out(value, message); }
59
60 /////////////////////////////////////////////////////////////////////////////////////////////
61 // asserter_message_out
62 /////////////////////////////////////////////////////////////////////////////////////////////
63 asserter_message_out::asserter_message_out(bool value, const char * message)
64 : asserter_t(value)
65 , m_message( message )
66 {}
67
68 /////////////////////////////////////////////////////////////////////////////////////////////
69 const asserter_t & asserter_message_out::print_message(const char * file, int line, const char * function, const char * ) const
70 {
71 return asserter_t::print_message( file, line, function, m_message );
72 }
73
74 void asserter_t::on_assert_fail()
75 {
76 memset((void*)1,0,1);
77 }
78
79 #endif
File test/plank/src/assert.h deleted (index 894d6fc..0000000)
1 /*
2 Reference: http://www.drdobbs.com/article/print?articleId=184403745
3 */
4
5 #ifndef ASSERT_H_9879879hkjh
6 #define ASSERT_H_9879879hkjh
7
8 #include <cstring>
9 #include <iostream>
10 #include <stdexcept>
11
12 #ifdef NDEBUG
13
14 #define ASSERT( expr ) \
15 if (false); \
16 else \
17 struct local_t \
18 { \
19 local_t( const asserter_t & ) {} \
20 } local_obj = asserter_t::make_asserter(false)
21
22 // asserter_t
23 class asserter_t
24 {
25 public:
26 static const asserter_t make_asserter(bool) { return asserter_t(); }
27 static const asserter_t make_asserter(bool, const char *) { return asserter_t(); }
28 template<class T> const asserter_t operator()(const T &) const { return asserter_t(); }
29 };
30
31 #else
32
33 #define SMART_ASSERT_A(x) SMART_ASSERT_OP(x, B)
34 #define SMART_ASSERT_B(x) SMART_ASSERT_OP(x, A)
35 #define SMART_ASSERT_OP(x, next) SMART_ASSERT_A.print_current_val((x), #x).SMART_ASSERT_ ## next
36
37 #ifndef TARGET_TEST
38 #define TARGET_TEST 0
39 #endif
40
41 #define ASSERT( expr ) \
42 if (!TARGET_TEST && (expr)); \
43 else \
44 struct local_t \
45 { \
46 local_t( const asserter_t & o ) \
47 { \
48 if( !o.can_handle() ) \
49 asserter_t::on_assert_fail(); \
50 } \
51 } \
52 local_obj = \
53 asserter_t::make_asserter( expr ).print_message( __FILE__, __LINE__, __FUNCTION__, #expr ).SMART_ASSERT_A
54
55 class asserter_message_out;
56 template<class> class asserter_throw_t;
57
58 // asserter_t
59 class asserter_t
60 {
61 public:
62 virtual bool can_handle() const;
63 virtual const asserter_t & print_message(const char * file, int line, const char * function, const char * = "" ) const;
64
65 template<class U> const asserter_t & print_current_val(const U &, const char*) const;
66
67 static const asserter_t make_asserter(bool);
68 static const asserter_message_out make_asserter(bool, const char *);
69 template<class T> static const asserter_throw_t<T> make_asserter(bool, const char *);
70
71 asserter_t & SMART_ASSERT_A;
72 asserter_t & SMART_ASSERT_B;
73
74 static void on_assert_fail();
75
76 protected:
77 asserter_t(bool);
78
79 private:
80 const bool m_value;
81 };
82
83 // asserter_message_out
84 class asserter_message_out : public asserter_t
85 {
86 public:
87 asserter_message_out(bool, const char *);
88
89 virtual const asserter_t & print_message(const char * file, int line, const char * function, const char * = "" ) const;
90
91 private:
92 const char * m_message;
93 };
94
95 // asserter_throw_t
96 template<class T>
97 class asserter_throw_t : public asserter_t
98 {
99 public:
100 asserter_throw_t(bool, const char *);
101 virtual bool can_handle(const char * file, int line, const char * function) const;
102
103 private:
104 const char * m_message;
105 };
106
107
108 #include "assert.hxx"
109
110 #endif // NDEBUG
111
112 #endif // ASSERT_H_9879879hkjh
File test/plank/src/assert.hxx deleted (index 0abec6c..0000000)
1 /////////////////////////////////////////////////////////////////////////////////////////////
2 // asserter_t
3 /////////////////////////////////////////////////////////////////////////////////////////////
4 template<class T>
5 const asserter_throw_t<T> asserter_t::make_asserter(bool value, const char * message)
6 { return asserter_throw_t<T>(value, message); }
7
8 /////////////////////////////////////////////////////////////////////////////////////////////
9 template<class U> const asserter_t & asserter_t::print_current_val(const U & value, const char * message) const
10 {
11 std::cout << message << ": " << value << std::endl;
12 return * this;
13 }
14
15 /////////////////////////////////////////////////////////////////////////////////////////////
16 // asserter_throw_t<T>
17 /////////////////////////////////////////////////////////////////////////////////////////////
18 template<class T>
19 bool asserter_throw_t<T>::can_handle(const char * file, int line, const char * function) const
20 {
21 if( !asserter_t::can_handle( file, line, function) )
22 throw T(m_message);
23 return true;
24 }
25
26 /////////////////////////////////////////////////////////////////////////////////////////////
27 template<class T>
28 asserter_throw_t<T>::asserter_throw_t(bool value, const char * message)
29 : asserter_t(value)
30 , m_message(message)
31 {}
File test/plank/src/test.h deleted (index 1990cca..0000000)
1 #ifndef TEST_H_3240OIJOOREOGGO
2 #define TEST_H_3240OIJOOREOGGO
3
4 #include <iostream>
5
6 #include "assert.h"
7
8 #define FOOTER std::cout << __FUNCTION__ << " passed" << std::endl;
9
10 #endif // TEST_H_3240OIJOOREOGGO
File test/plank/test/plank deleted (index b870225..0000000)
1 ../
File test/plank/test/src/main.cpp deleted (index 147f842..0000000)
1 #include <iostream>
2
3 //#include "test.h"
4
5 int main(int argc, const char * argv[])
6 {
7 using namespace std;
8 string var( "hello" );
9
10 // ASSERT( var.size() )(var);
11
12 cout << var << endl;
13 return 0;
14 }
File test/plank/test/src/main.mm deleted (index f32502a..0000000)
1 #include <iostream>
2
3 #include "plank/src/test.h"
4 #include "lib/platform/interface.h"
5
6 int main(int argc, const char * argv[])
7 {
8 std::cout <<"hello"<< std::endl;
9 ASSERT( om636::platform().make_client() );
10 ASSERT( om636::platform().make_window() );
11
12 return 0;
13 }
File test/plank/test/test.gyp deleted (index 544e13a..0000000)
1 {
2 'includes':[
3 'plank/def/mac-targets.gypi',
4 'plank/def/cpp11.gypi',
5 'plank/def/plank.gypi',
6 ], #inclues
7 'target_defaults': {
8 'target_name': 'test',
9 'type': 'executable',
10 'sources': [
11 'src/main.cpp'
12 ], #sources
13 'include_dirs': [
14 'plank/src/',
15 '.'
16 ] #include_dirs
17 } #target_defaults
18 }
File test/plank/test/test.js deleted (index 630bcac..0000000)
1 #!/usr/bin/env node
2
3 var assert = require( 'assert' )
4 , cp = require( 'child_process' )
5 , path = require( 'path' )
6 , Expector = require( 'expector' ).Expector
7 , controller = new Expector();
8
9 controller.expect( 'built' );
10 controller.expect( 'hello\n' );
11
12 cp
13 .fork( path.join( __dirname, 'plank/bin/test.js' ) )
14 .on( 'exit', function() {
15 controller.emit( 'built' );
16 cp.execFile( path.join( __dirname, '/build/Test/test' ), function(err, stdout, stderr) {
17 if(err) throw err;
18 controller.emit( stdout );
19 } );
20 });
21
22 process.on( 'exit', function() {
23 controller.check();
24 });
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/dynamo

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/dynamo

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/dynamo

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main