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

View File

@ -269,7 +269,7 @@ int i2c_del_adapter(struct i2c_adapter *adap)
dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
out_unlock:
out_unlock:
up(&core_lists);
return res;
}
@ -310,7 +310,7 @@ int i2c_add_driver(struct i2c_driver *driver)
}
}
out_unlock:
out_unlock:
up(&core_lists);
return res;
}
@ -364,7 +364,7 @@ int i2c_del_driver(struct i2c_driver *driver)
list_del(&driver->list);
pr_debug("i2c-core: driver [%s] unregistered\n", driver->name);
out_unlock:
out_unlock:
up(&core_lists);
return 0;
}
@ -462,7 +462,7 @@ int i2c_detach_client(struct i2c_client *client)
up(&adapter->clist_lock);
wait_for_completion(&client->released);
out:
out:
return res;
}
@ -503,7 +503,7 @@ int i2c_use_client(struct i2c_client *client)
}
return 0;
busy:
busy:
i2c_dec_use_client(client);
return -EBUSY;
}
@ -597,7 +597,7 @@ int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg *msgs, int num)
}
}
int i2c_master_send(struct i2c_client *client,const char *buf ,int count)
int i2c_master_send(struct i2c_client *client,const char *buf,int count)
{
int ret;
struct i2c_adapter *adap=client->adapter;
@ -615,7 +615,7 @@ int i2c_master_send(struct i2c_client *client,const char *buf ,int count)
return (ret == 1) ? count : ret;
}
int i2c_master_recv(struct i2c_client *client, char *buf ,int count)
int i2c_master_recv(struct i2c_client *client, char *buf,int count)
{
struct i2c_adapter *adap=client->adapter;
struct i2c_msg msg;
@ -706,7 +706,7 @@ int i2c_probe(struct i2c_adapter *adapter,
int adap_id = i2c_adapter_id(adapter);
/* Forget it if we can't probe using SMBUS_QUICK */
if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_QUICK))
if (!i2c_check_functionality(adapter,I2C_FUNC_SMBUS_QUICK))
return -1;
/* Force entries are done first, and are not affected by ignore
@ -1027,10 +1027,9 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter * adapter, u16 addr,
simpler. */
unsigned char msgbuf0[34];
unsigned char msgbuf1[34];
int num = read_write == I2C_SMBUS_READ?2:1;
int num = read_write == I2C_SMBUS_READ ? 2 : 1;
struct i2c_msg msg[2] = { { addr, flags, 1, msgbuf0 },
{ addr, flags | I2C_M_RD, 0, msgbuf1 }
};
{ addr, flags | I2C_M_RD, 0, msgbuf1 }};
int i;
msgbuf0[0] = command;
@ -1038,7 +1037,7 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter * adapter, u16 addr,
case I2C_SMBUS_QUICK:
msg[0].len = 0;
/* Special case: The read/write field is used as data */
msg[0].flags = flags | (read_write==I2C_SMBUS_READ)?I2C_M_RD:0;
msg[0].flags = flags | (read_write==I2C_SMBUS_READ) ? I2C_M_RD : 0;
num = 1;
break;
case I2C_SMBUS_BYTE:

View File

@ -14,14 +14,14 @@ void foo()
log.foo.bar = 5;
log.narf.sweat = "cat";
for (i = 0; i<5; i++) bar(i);
for (i = 0; i<5; i++) bar(i);
}
int this_works(int x);
int bug(int); // BUG: left-aligned
typedef int fooman;
enum FLAGS
{
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()
Example()
: member(0)
{}
{
}
int member;
int member;
};

View File

@ -5,30 +5,30 @@ bool Method (int argument_1, int argument_2)
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 ()
@ -37,14 +37,14 @@ void AnotherMethod ()
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++;
}
}
}
@ -68,46 +68,46 @@ void Bar () {
// class library
class Blah {
Hashtable ht;
void Foo (int zzz, Entry blah) {
Hashtable ht;
void Foo (int zzz, Entry blah) {
lock (ht) {
ht.Add (zzz, blah);
}
}
}
void Bar ()
{
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 ()
{
void DoStuff ()
{
lock (this) {
int i = GetNumber ();
Entry e = GetEntry ();
Foo (i, e);
}
}
}
override void EachBar (Entry 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,9 +1,9 @@
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
k = (a, b) -> if b? return a
f = b()[0]
for c, i in "Hello World"

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,13 +1,14 @@
<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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Shopping List for <%= @date.strftime('%A, %d %B %Y') %></title>
<title>Shopping List for
<%= @date.strftime('%A, %d %B %Y') %></title>
</head>
<body>
<h1>Shopping List for <%= @date.strftime('%A, %d %B %Y') %></h1>
<h1>Shopping List for
<%= @date.strftime('%A, %d %B %Y') %></h1>
<p>You need to buy:</p>
<ul>
<% for @item in @items %>
@ -15,4 +16,4 @@
<% end %>
</ul>
</body>
</html>
</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 *
"max_preserve_newlines": 2,
/* test *
"jslint_happy": true
}
}
*/

View File

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

View File

@ -31,14 +31,14 @@
&:hover {
background-color: lighten(@black, 50%);
cursor: pointer;
}
}
&:active {
background-color: lighten(@black, 25%);
}
}
}
}
&.modal-2text {
.innerModal {
width: @container-width;
@ -49,24 +49,24 @@
border-radius: 4px;
h2 {
margin: 0px 0px 7px 0px;
}
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%;
@ -78,6 +78,7 @@
width: 600px;
height: 340px;
margin: 2% auto;
}
//container
> div {
@ -90,78 +91,78 @@
&: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;
}
margin: 60px auto 70px;
div.photo-view {
}
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;
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

@ -4,4 +4,4 @@
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);
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)
{
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;
}
}
}

View File

@ -3,11 +3,11 @@
conn_hash = { :hosts => [
{:login => login, :passcode => passcode, :host => host, :port => port},
],
],
:reliable => false, # Override default
:connect_headers => conn_hdrs,
:connect_headers => conn_hdrs,
}
}
hash = { :hosts => [

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 {
line-height: 56px;
&:hover {
color: blue;
}
}
}

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 {
}
};