See #18. Beautify most of the expected tests.

I was unable to do Python and SQL, as I am having Python problems on my
laptop. Hopefully I will be able to figure this out soon.
This commit is contained in:
Glavin Wiechert 2014-12-28 02:38:06 -04:00
parent b147ecd9fa
commit f8e0e445ae
31 changed files with 1261 additions and 1263 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,25 +3,25 @@ fm_status fm2000EventHandlingInitialize(fm_int sw);
fm_status fm2000MacTableOverflowStart(fm_int sw);
fm_bool fm2000ProcessMATableEntry( fm_mac_table_work_list *pWork,
fm_int sw,
fm_int index,
fm_int index,
fm_thread * event_handler,
fm_uint32 * numUpdates,
fm_event **event);
void foo()
{
Logger log = new Logger();
Logger log= new Logger( );
Logger log = new Logger();
Logger log= new Logger( );
log.foo.bar = 5;
log.narf.sweat = "cat";
for (i = 0; i<5; i++) bar(i);
log.foo.bar = 5;
log.narf.sweat = "cat";
for (i = 0; i<5; i++) bar(i);
}
int this_works(int x);
int bug(int); // BUG: left-aligned
typedef int fooman;
enum FLAGS
{
FLAGS_decimal = 1, // decimal
FLAGS_unsigned = 2, // u or U suffix
FLAGS_long = 4, // l or L suffix
};
enum FLAGS
{
FLAGS_decimal = 1, // decimal
FLAGS_unsigned = 2, // u or U suffix
FLAGS_long = 4, // l or L suffix
};

View File

@ -1,10 +1,11 @@
class Example
{
Example()
: member(0)
{}
Example()
: member(0)
{
}
int member;
int member;
};

View File

@ -1,50 +1,50 @@
class X : Y {
bool Method (int argument_1, int argument_2)
{
#region something
int foo = 0;
#endregion
#region something
int foo = 0;
#endregion
if (argument_1 == argument_2)
throw new Exception (Locale.GetText ("They are equal!"));
if (argument_1 == argument_2)
throw new Exception (Locale.GetText ("They are equal!"));
if (argument_1 < argument_2) {
if (argument_1 * 3 > 4)
return true;
else
return false;
}
if (argument_1 < argument_2) {
if (argument_1 * 3 > 4)
return true;
else
return false;
}
//
// This sample helps keep your sanity while using 8-spaces for tabs
//
VeryLongIdentifierWhichTakesManyArguments (
Argument1,
Argument2, Argument3,
NestedCallHere (
MoreNested));
VeryLongIdentifierWhichTakesManyArguments (
Argument1,
Argument2, Argument3,
NestedCallHere (
MoreNested));
}
bool MyProperty {
get { return x; }
get { return x; }
set { x = value; }
set { x = value; }
}
void AnotherMethod ()
{
Logger log = new Logger();
log.foo.bar = 5;
log.narf.sweat = "cat";
Logger log = new Logger();
log.foo.bar = 5;
log.narf.sweat = "cat";
if ((a + 5) != 4) {
}
if ((a + 5) != 4) {
}
while (blah) {
if (a)
continue;
b++;
}
while (blah) {
if (a)
continue;
b++;
}
}
}
@ -52,62 +52,62 @@ object lockA;
object lockB;
void Foo () {
lock (lockA) {
lock (lockB) {
}
}
lock (lockA) {
lock (lockB) {
}
}
}
void Bar () {
lock (lockB) {
lock (lockA) {
}
}
lock (lockB) {
lock (lockA) {
}
}
}
// class library
class Blah {
Hashtable ht;
void Foo (int zzz, Entry blah) {
lock (ht) {
ht.Add (zzz, blah);
}
}
Hashtable ht;
void Foo (int zzz, Entry blah) {
lock (ht) {
ht.Add (zzz, blah);
}
}
void Bar ()
{
lock (ht) {
foreach (Entry e in ht)
EachBar (e);
}
}
void Bar ()
{
lock (ht) {
foreach (Entry e in ht)
EachBar (e);
}
}
virtual void EachBar (Entry e)
{
}
virtual void EachBar (Entry e)
{
}
}
// User
class MyBlah {
byte[] box = new byte[6];
byte[] box = new byte[6];
box[2] = 56;
box[2] = 56;
void DoStuff ()
{
lock (this) {
int i = GetNumber ();
Entry e = GetEntry ();
Foo (i, e);
}
}
override void EachBar (Entry e)
{
void DoStuff ()
{
lock (this) {
DoSomething (e);
int i = GetNumber ();
Entry e = GetEntry ();
Foo (i, e);
}
}
}
override void EachBar (Entry e)
{
lock (this) {
DoSomething (e);
}
}
}

View File

@ -1,3 +1,3 @@
p {
color: red;
color: red;
}

View File

@ -2,14 +2,14 @@
<html>
<head>
<title>Test Page</title>
<title>Test Page</title>
</head>
<body>
<h1>Hello</h1>
<p>
World!
</p>
<h1>Hello</h1>
<p>
World!
</p>
</body>
</html>

View File

@ -1,35 +1,35 @@
class Aligns {
final int SZF = 4;
final int SZ2F = 4;
final int aBarF;
final int someIntsF[];
final int someIntsSzdF[4];
final int[] someMoreIntsF;
final int lotsOfIntsF[][][][][][];
final int[][][][] lotsMoreIntsF;
final Tem<Plate> edVarF;
final int aBarSetF=null;
final int someIntsSetF[]=null;
final int someIntsSzdSetF[4]=null;
final int[] someMoreIntsSetF=null;
final int lotsOfIntsSetF[][][][][][]=null;
final int[][][][] lotsMoreIntsSetF=null;
final Tem<Plate> edVarF=null;
int SZ = 4;
int SZ2 = 4;
int aBar;
int someInts[];
int someIntsSzd[4];
int spacer;
int[] someMoreInts;
int lotsOfInts[][][][][][];
int[][][][] lotsMoreInts;
Tem<Plate> edVar;
int aBarSet=null;
int someIntsSet[]=null;
int someIntsSzdSet[4]=null;
int[] someMoreIntsSet=null;
int lotsOfIntsSet[][][][][][]=null;
int[][][][] lotsMoreIntsSet=null;
Tem<Plate> edVar=null;
final int SZF = 4;
final int SZ2F = 4;
final int aBarF;
final int someIntsF[];
final int someIntsSzdF[4];
final int[] someMoreIntsF;
final int lotsOfIntsF[][][][][][];
final int[][][][] lotsMoreIntsF;
final Tem<Plate> edVarF;
final int aBarSetF=null;
final int someIntsSetF[]=null;
final int someIntsSzdSetF[4]=null;
final int[] someMoreIntsSetF=null;
final int lotsOfIntsSetF[][][][][][]=null;
final int[][][][] lotsMoreIntsSetF=null;
final Tem<Plate> edVarF=null;
int SZ = 4;
int SZ2 = 4;
int aBar;
int someInts[];
int someIntsSzd[4];
int spacer;
int[] someMoreInts;
int lotsOfInts[][][][][][];
int[][][][] lotsMoreInts;
Tem<Plate> edVar;
int aBarSet=null;
int someIntsSet[]=null;
int someIntsSzdSet[4]=null;
int[] someMoreIntsSet=null;
int lotsOfIntsSet[][][][][][]=null;
int[][][][] lotsMoreIntsSet=null;
Tem<Plate> edVar=null;
}

View File

@ -1,3 +1,3 @@
function hell() {
console.log('world');
console.log('world');
}

View File

@ -1,4 +1,4 @@
- item
1. one
2. two
3. three
- item
1. one
2. two
3. three

View File

@ -2,29 +2,29 @@
- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError {
#pragma unused(typeName)
// Produce the data lump:
NSData * retval = [NSKeyedArchiver archivedDataWithRootObject:model];
// Produce the data lump:
NSData * retval = [NSKeyedArchiver archivedDataWithRootObject:model];
// If the lump is nil something went wrong
// fill out the error object to explain what wrent wrong
if ( outError != NULL ) {
// The sender wanted an error reported. If there
// was a problem, fill in an NSError object
if (retval == nil) {
// The error object should include an (unhelpful)
// explanation of what happened
NSDictionary * userInfoDict = [NSDictionary dictionaryWithObjectsAndKeys:
@"Internal error formatting data", NSLocalizedDescriptionKey,
@"Archiving of data failed. Probably a bug.", NSLocalizedFailureReasonErrorKey,
@"There's nothing you can do.", NSLocalizedRecoverySuggestionErrorKey, nil];
// If the lump is nil something went wrong
// fill out the error object to explain what wrent wrong
if ( outError != NULL ) {
// The sender wanted an error reported. If there
// was a problem, fill in an NSError object
if (retval == nil) {
// The error object should include an (unhelpful)
// explanation of what happened
NSDictionary * userInfoDict = [NSDictionary dictionaryWithObjectsAndKeys:
@"Internal error formatting data", NSLocalizedDescriptionKey,
@"Archiving of data failed. Probably a bug.", NSLocalizedFailureReasonErrorKey,
@"There's nothing you can do.", NSLocalizedRecoverySuggestionErrorKey, nil];
*outError = [NSError errorWithDomain:LinearInternalErrorDomain
code:linErrCantFormatDocumentData
userInfo:userInfoDict];
} else {
// No problem. Don't supply an error object.
*outError = nil;
*outError = [NSError errorWithDomain:LinearInternalErrorDomain
code:linErrCantFormatDocumentData
userInfo:userInfoDict];
} else {
// No problem. Don't supply an error object.
*outError = nil;
}
}
}
return retval;
return retval;
}

View File

@ -1,10 +1,10 @@
hello derek how is it going?
hello derek how is it going?
for c, i in "Hello World!"
k = 1+1- 2>=3<= 4>5 <6
k = 1 + 1 - 2 >= 3 <= 4 > 5 < 6
for c, i in "Hello World"
k = (a,b)-> if b? return a
for c, i in "Hello World"
k = (a, b) -> if b? return a
f = b()[0]
f = b()[0]
for c, i in "Hello World"
f(b())

View File

@ -1,3 +1,3 @@
p {
color: red;
color: red;
}

View File

@ -1,10 +1,10 @@
{{#if}}
{{#each}}
{{#if}}
content
{{/if}}
{{#if}}
content
{{/if}}
{{/each}}
{{#each}}
{{#if}}
content
{{/if}}
{{#if}}
content
{{/if}}
{{/each}}
{{/if}}

View File

@ -1,18 +1,19 @@
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Shopping List for <%= @date.strftime('%A, %d %B %Y') %></title>
</head>
<body>
<h1>Shopping List for <%= @date.strftime('%A, %d %B %Y') %></h1>
<p>You need to buy:</p>
<ul>
<% for @item in @items %>
<li><%= h(@item) %></li>
<% end %>
</ul>
</body>
</html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Shopping List for
<%= @date.strftime('%A, %d %B %Y') %></title>
</head>
<body>
<h1>Shopping List for
<%= @date.strftime('%A, %d %B %Y') %></h1>
<p>You need to buy:</p>
<ul>
<% for @item in @items %>
<li><%= h(@item) %></li>
<% end %>
</ul>
</body>
</html>

View File

@ -2,14 +2,14 @@
<html>
<head>
<title>Test Page</title>
<title>Test Page</title>
</head>
<body>
<h1>Hello</h1>
<p>
World!
</p>
<h1>Hello</h1>
<p>
World!
</p>
</body>
</html>

View File

@ -1,3 +1,3 @@
function hell() {
console.log('world');
console.log('world');
}

View File

@ -1,9 +1,12 @@
{
"indent_size": 2,
"indent_char": " ", // test
"indent_char": " ", // test
"indent_level": 0,
"indent_with_tabs": false, /* test */
"indent_with_tabs": false,
/* test */
"preserve_newlines": true,
"max_preserve_newlines": 2, /* test *
"jslint_happy": true
}
"max_preserve_newlines": 2,
/* test *
"jslint_happy": true
}
*/

View File

@ -1,33 +1,32 @@
a {
line-height: @headerHeight;
a {
line-height: @headerHeight;
display: block;
padding: 0px 15px;
font-size: 16px;
button {
font-size: 16px;
}
&:link {
color: @white;
display: block;
padding: 0 15px;
font-size: 16px;
button {
font-size: 16px;
}
&:link {
color: @white;
text-decoration: none;
}
&:visited {
color: @white;
text-decoration: none;
}
&:visited {
color: @white;
}
&:hover {
color: @orange;
}
&:hover {
color: @orange;
}
&.green {
color: @green;
}
&.green {
color: @green;
&:hover {
color: @white;
&:hover {
color: @white;
background-color: @green;
}
}
background-color: @green;
}
}
}

View File

@ -3,167 +3,168 @@
@import (reference)"mixins.less";
.modal {
position: fixed;
height: 100%;
width: 100%;
background-color: fade(@black, 70%);
z-index: 10;
position: fixed;
height: 100%;
width: 100%;
background-color: fade(@black, 70%);
z-index: 10;
opacity: 0;
display: none;
.innerModal {
margin: auto;
background-color: @white;
overflow: hidden;
-webkit-transform: translateY(-100%);
-moz-transform: translateY(-100%);
-ms-transform: translateY(-100%);
-o-transform: translateY(-100%);
transform: translateY(-100%);
.fa {
float: right;
color: @white;
background-color: firebrick;
padding: 5px 7px;
border-radius: 20px;
&:hover {
background-color: lighten(@black, 50%);
cursor: pointer;
}
&:active {
background-color: lighten(@black, 25%);
}
}
}
&.modal-2text {
.innerModal {
width: @container-width;
margin-top: 50px;
height: 75%;
padding: 10px 25px;
background-color: gainsboro;
border-radius: 4px;
h2 {
margin: 0 0 7px;
}
div {
height: 70%;
overflow-y: scroll;
background-color: @white;
padding: 15px;
border-radius: 4px;
}
.large-cta {
margin-top: 25px;
}
}
}
}
#modal-video {
.innerModal {
left: 10%;
margin-top: 30px;
width: 1000px;
background-color: lighten(@black, 25%);
iframe {
width: 600px;
height: 340px;
margin: 2% auto;
}
//container
> div {
text-align: center;
a {
.styleLinks(@white, darken(@white, 10%));
padding: 5px;
text-transform: uppercase;
&:hover {
background-color: fade(@white, 15%);
}
&:active {
background-color: fade(@white, 30%);
}
}
h3 {
color: @white;
font-size: 3em;
margin: 20px auto;
}
button {
margin-bottom: 50px;
}
}
}
}
.slideIn {
.animation(SlideIn, 0.5s);
}
@-webkit-keyframes SlideIn {
0% {
.transform(translateY(-100%));
}
100% {
.transform(translateY(0px));
}
}
.fadeIn {
display: block;
.animation(FadeIn, 0.5s);
}
@-webkit-keyframes FadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.slideOut {
.animation(SlideOut, 0.5s);
}
@-webkit-keyframes SlideOut {
0% {
.transform(translateY(0%));
}
100% {
.transform(translateY(-100%));
}
}
.fadeOut {
.animation(FadeOut, 0.5s);
}
@-webkit-keyframes FadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
display: none;
.innerModal {
margin: auto;
background-color: @white;
overflow: hidden;
-webkit-transform: translateY(-100%);
-moz-transform: translateY(-100%);
-ms-transform: translateY(-100%);
-o-transform: translateY(-100%);
transform: translateY(-100%);
.fa {
float: right;
color: @white;
background-color: firebrick;
padding: 5px 7px;
border-radius: 20px;
&:hover {
background-color: lighten(@black, 50%);
cursor: pointer;
}
&:active {
background-color: lighten(@black, 25%);
}
}
}
&.modal-2text {
.innerModal {
width: @container-width;
margin-top: 50px;
height: 75%;
padding: 10px 25px;
background-color: gainsboro;
border-radius: 4px;
h2 {
margin: 0px 0px 7px 0px;
}
div {
height: 70%;
overflow-y: scroll;
background-color: @white;
padding: 15px;
border-radius: 4px;
}
.large-cta {
margin-top: 25px;
}
}
}
}
#modal-video {
.innerModal {
left: 10%;
margin-top: 30px;
width: 1000px;
background-color: lighten(@black, 25%);
iframe {
width: 600px;
height: 340px;
margin: 2% auto;
}
//container
> div {
text-align: center;
a {
.styleLinks(@white, darken(@white, 10%));
padding: 5px;
text-transform: uppercase;
&:hover {
background-color: fade(@white, 15%);
}
&:active {
background-color: fade(@white, 30%);
}
}
h3 {
color: @white;
font-size: 3em;
margin: 20px auto;
}
button {
margin-bottom: 50px;
}
}
}
}
.slideIn {
.animation(SlideIn, 0.5s);
}
@-webkit-keyframes SlideIn {
0% {
.transform(translateY(-100%));
}
100% {
.transform(translateY(0px));
}
}
.fadeIn {
display: block;
.animation(FadeIn, 0.5s);
}
@-webkit-keyframes FadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.slideOut {
.animation(SlideOut, 0.5s);
}
@-webkit-keyframes SlideOut {
0% {
.transform(translateY(0%));
}
100% {
.transform(translateY(-100%));
}
}
.fadeOut {
.animation(FadeOut, 0.5s);
}
@-webkit-keyframes FadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
display: none;
}
}
}

View File

@ -1,9 +1,14 @@
// Breaks (fixed now)
.mixin(@variable, @anotherVariable) {
}
// Works
.mixin(@variable; @anotherVariable) {
}
// Ok
.mixin(@variable) {
}

View File

@ -1,20 +1,17 @@
section#photo-details {
width: 1140px;
margin: 60px auto 70px auto;
width: 1140px;
margin: 60px auto 70px;
}
div.photo-view {
text-align: center;
figure {
box-shadow: 0 0 3px 1px rgba(0,0,0,0.75)
;
display : inline-block;
margin : 0 0 60px;
padding
: 0;
img {
display: block;
}
}
div.photo-view {
text-align: center;
figure {
box-shadow: 0 0 3px 1px rgba(0,0,0,0.75);
display: inline-block;
margin: 0 0 60px;
padding: 0;
img {
display: block;
}
}
}

View File

@ -1,7 +1,7 @@
- item
- item
- item
- item
- item
1. one
1. one
2. two
2. three
3. three

View File

@ -3,14 +3,16 @@
{{/bug}}
{{#items}}
{{#first}}
<li><strong>{{name}}</strong></li>
{{/first}}
{{#link}}
<li><a href="{{url}}">{{name}}</a></li>
{{/link}}
{{#first}}
<li><strong>{{name}}</strong>
</li>
{{/first}}
{{#link}}
<li><a href="{{url}}">{{name}}</a>
</li>
{{/link}}
{{/items}}
{{#empty}}
<p>The list is empty.</p>
<p>The list is empty.</p>
{{/empty}}

View File

@ -1,32 +1,25 @@
<?php
$hello = "world";
if (!isset($_SESSION)) session_start();
require_once("sql.req.php");
require_once ("sql.req.php");
// friend requests
$q = $mysqli->query("");
$num = $q->num_rows;
echo '<a href="notifications.php">';
if ($num>0) { echo '<i class="fa fa-star white"></i>';
}else { echo '<i class="fa fa-star-o"></i>'; }
if ($num > 0) {
echo '<i class="fa fa-star white"></i>';
} else {
echo '<i class="fa fa-star-o"></i>';
}
echo '</a>';
// new messages
$q = $mysqli->query("");
$num = $q->num_rows;
echo '<a href="messages.php">';
if ($num>0) {
echo '<i class="fa fa-envelope white"></i>';
}else {
echo '<i class="fa fa-envelope-o"></i>';
if ($num > 0) {
echo '<i class="fa fa-envelope white"></i>';
} else {
echo '<i class="fa fa-envelope-o"></i>';
}
echo '</a>';
?>

View File

@ -1,4 +1,5 @@
<?php
function add($a, $b) {
return $a +$b; }
echo add(1,2);
function add($a, $b) {
return $a + $b;
}
echo add(1, 2);

View File

@ -1,19 +1,13 @@
<?php
class Date
{
const FORMAT_FULL = 'full';
const FORMAT_LONG = 'long';
const FORMAT_MEDIUM = 'medium';
const FORMAT_SHORT = 'short';
public static function formatDate($time, $format)
{
if(!$time || $time == null)
{
return '';
class Date {
const FORMAT_FULL = 'full';
const FORMAT_LONG = 'long';
const FORMAT_MEDIUM = 'medium';
const FORMAT_SHORT = 'short';
public static function formatDate($time, $format) {
if (!$time || $time == null) {
return '';
}
return $time;
}
return $time;
}
}

View File

@ -2,24 +2,24 @@
conn_hash = { :hosts => [
{:login => login, :passcode => passcode, :host => host, :port => port},
],
:reliable => false, # Override default
:connect_headers => conn_hdrs,
{:login => login, :passcode => passcode, :host => host, :port => port},
],
:reliable => false, # Override default
:connect_headers => conn_hdrs,
}
}
hash = { :hosts => [
{:login => user, :passcode => password, :host => 'noonehome', :port => 2525},
{:login => user, :passcode => password, :host => 'noonehome', :port => 2525},
{:login => user, :passcode => password, :host => host, :port => port},
{:login => user, :passcode => password, :host => host, :port => port},
],
],
:logger => mylog, # This enables callback logging!
:logger => mylog, # This enables callback logging!
:max_reconnect_attempts => 5,
:max_reconnect_attempts => 5,
}
}

View File

@ -1,4 +1,6 @@
.example(){
.base-apple(); // Sets base apple color to red
.apple-color(@color-green); // Sets apple color to green
.example() {
.base-apple();
// Sets base apple color to red
.apple-color(@color-green);
// Sets apple color to green
}

View File

@ -1,6 +1,6 @@
a {
line-height: 56px;
&:hover {
color: blue;
}
line-height: 56px;
&:hover {
color: blue;
}
}

View File

@ -2,10 +2,10 @@
.container {
.cta--primary {
&:visited {
//whatever
//whatever
}
&::before {
//whatever
//whatever
}
}
}

View File

@ -1,8 +1,8 @@
module TestModule {
export class A {
constructor(private a: string) {
}
}
export class B extends A {
}
export class A {
constructor(private a: string) {
}
}
export class B extends A {
}
};