/**
 * This program and the accompanying materials
 * are made available under the terms of the License
 * which accompanies this distribution in the file LICENSE.txt
 */
package com.archimatetool.editor.diagram.commands;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;

import com.archimatetool.editor.model.DiagramModelUtils;
import com.archimatetool.model.IDiagramModelArchimateConnection;
import com.archimatetool.model.IDiagramModelArchimateObject;
import com.archimatetool.model.IDiagramModelConnection;

/**
 * Compound Command to delete nested connections between parent and childObjects in nested objects.
 * This is used when the user drags objects into a parent Archimate object and nested connections to child are removed.
 *
 * @author Phillip Beauvoir
 */
public class DeleteNestedConnectionsCommand extends CompoundCommand {

    IDiagramModelArchimateObject fParentObject;
    List<IDiagramModelArchimateObject> fChildObjects;

    public DeleteNestedConnectionsCommand(IDiagramModelArchimateObject parentObject, IDiagramModelArchimateObject childObject) {
        fParentObject = parentObject;
        fChildObjects = new ArrayList<IDiagramModelArchimateObject>();
        fChildObjects.add(childObject);
    }

    public DeleteNestedConnectionsCommand(IDiagramModelArchimateObject parentObject, List<IDiagramModelArchimateObject> childObjects) {
        fParentObject = parentObject;
        fChildObjects = childObjects;
    }

    @Override
    public void execute() {
        createDeleteCommands();

        super.execute();
    }

    // These should return true always because sub-commands are only created on execute()

    @Override
    public boolean canExecute() {
        return true;
    }

    @Override
    public boolean canUndo() {
        return true;
    }

    @Override
    public boolean canRedo() {
        return true;
    }

    /**
     * Child Objects that have connections
     */
    void createDeleteCommands() {
        for(IDiagramModelArchimateObject child : fChildObjects) {
            for(IDiagramModelConnection connection : child.getTargetConnections()) {
                if(connection instanceof IDiagramModelArchimateConnection && DiagramModelUtils.shouldBeHiddenConnection((IDiagramModelArchimateConnection)connection)) {
	                for(IDiagramModelConnection subconnection : connection.getTargetConnections()) {
                        Command cmd = DiagramCommandFactory.createDeleteDiagramConnectionCommand(subconnection);
                        add(cmd);
	                }

	                for(IDiagramModelConnection subconnection : connection.getSourceConnections()) {
                        Command cmd = DiagramCommandFactory.createDeleteDiagramConnectionCommand(subconnection);
                        add(cmd);
	                }
                }
            }
        }
    }
}

{'repo_name': 'archimatetool/archi', 'stars': '400', 'repo_language': 'Java', 'file_name': 'MANIFEST.MF', 'mime_type': 'text/plain', 'hash': -3858511220024064329, 'source_dataset': 'data'}


require('../../../modules/es6.array.last-index-of');
module.exports = require('../../../modules/_entry-virtual')('Array').lastIndexOf;

{'repo_name': 'cellardoor42/whatever', 'stars': '353', 'repo_language': 'JavaScript', 'file_name': 'config.js', 'mime_type': 'text/x-asm', 'hash': -6878923503915295261, 'source_dataset': 'data'}


DROP TABLE IF EXISTS diaries;
FLUSH STATUS;
SET NAMES UTF8MB4;
CREATE TABLE diaries (
id INT UNSIGNED NOT NULL,
year INT UNSIGNED,
month INT UNSIGNED,
day INT UNSIGNED,
title VARCHAR(255),
content TEXT,
FULLTEXT INDEX(content),
KEY(month),
KEY(day)
) DEFAULT CHARSET UTF8MB4;
INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。");
INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について");
INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。");
INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。");
INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。");
INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪！");
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE)
ORDER BY day;
id	year	month	day	title	content
7	2011	12	2	初雪	今日の天気は雪！
1	2011	11	9	Hello	今日からはじめました。
3	2011	11	11	富士山	今日も天気がよくてきれいに見える。
4	2011	11	12	帰り道	今日は天気がよくてよかった。
5	2011	11	13	はれ	天気がよいのは今日までみたい。
SHOW STATUS LIKE 'mroonga_fast_order_limit';
Variable_name	Value
Mroonga_fast_order_limit	0
DROP TABLE diaries;

{'repo_name': 'mroonga/mroonga', 'stars': '141', 'repo_language': 'C++', 'file_name': 'Makefile.am', 'mime_type': 'text/plain', 'hash': -2809785793526514118, 'source_dataset': 'data'}


This is a READ ONLY repository.

Please make your pull request to https://github.com/php-cache/cache

Thank you for contributing.

{'repo_name': 'directus/directus', 'stars': '7061', 'repo_language': 'PHP', 'file_name': 'browserconfig.xml', 'mime_type': 'text/xml', 'hash': -3887415959407846876, 'source_dataset': 'data'}


package scanner

import (
	"fmt"

	"github.com/hashicorp/hil/ast"
)

type Token struct {
	Type    TokenType
	Content string
	Pos     ast.Pos
}

//go:generate stringer -type=TokenType
type TokenType rune

const (
	// Raw string data outside of ${ .. } sequences
	LITERAL TokenType = 'o'

	// STRING is like a LITERAL but it's inside a quoted string
	// within a ${ ... } sequence, and so it can contain backslash
	// escaping.
	STRING TokenType = 'S'

	// Other Literals
	INTEGER TokenType = 'I'
	FLOAT   TokenType = 'F'
	BOOL    TokenType = 'B'

	BEGIN    TokenType = '$' // actually "${"
	END      TokenType = '}'
	OQUOTE   TokenType = '“' // Opening quote of a nested quoted sequence
	CQUOTE   TokenType = '”' // Closing quote of a nested quoted sequence
	OPAREN   TokenType = '('
	CPAREN   TokenType = ')'
	OBRACKET TokenType = '['
	CBRACKET TokenType = ']'
	COMMA    TokenType = ','

	IDENTIFIER TokenType = 'i'

	PERIOD  TokenType = '.'
	PLUS    TokenType = '+'
	MINUS   TokenType = '-'
	STAR    TokenType = '*'
	SLASH   TokenType = '/'
	PERCENT TokenType = '%'

	AND  TokenType = '∧'
	OR   TokenType = '∨'
	BANG TokenType = '!'

	EQUAL    TokenType = '='
	NOTEQUAL TokenType = '≠'
	GT       TokenType = '>'
	LT       TokenType = '<'
	GTE      TokenType = '≥'
	LTE      TokenType = '≤'

	QUESTION TokenType = '?'
	COLON    TokenType = ':'

	EOF TokenType = '␄'

	// Produced for sequences that cannot be understood as valid tokens
	// e.g. due to use of unrecognized punctuation.
	INVALID TokenType = '�'
)

func (t *Token) String() string {
	switch t.Type {
	case EOF:
		return "end of string"
	case INVALID:
		return fmt.Sprintf("invalid sequence %q", t.Content)
	case INTEGER:
		return fmt.Sprintf("integer %s", t.Content)
	case FLOAT:
		return fmt.Sprintf("float %s", t.Content)
	case STRING:
		return fmt.Sprintf("string %q", t.Content)
	case LITERAL:
		return fmt.Sprintf("literal %q", t.Content)
	case OQUOTE:
		return fmt.Sprintf("opening quote")
	case CQUOTE:
		return fmt.Sprintf("closing quote")
	case AND:
		return "&&"
	case OR:
		return "||"
	case NOTEQUAL:
		return "!="
	case GTE:
		return ">="
	case LTE:
		return "<="
	default:
		// The remaining token types have content that
		// speaks for itself.
		return fmt.Sprintf("%q", t.Content)
	}
}

{'repo_name': 'vancluever/terraform-provider-acme', 'stars': '213', 'repo_language': 'Go', 'file_name': 'dyn.html.markdown', 'mime_type': 'text/plain', 'hash': -1098565138581024317, 'source_dataset': 'data'}


//
//  AppDelegate.swift
//  XcodeWayApp
//
//  Created by Khoa Pham on 18.10.2017.
//  Copyright © 2017 Fantageek. All rights reserved.
//

import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
  func applicationDidFinishLaunching(_ aNotification: Notification) {
    // Insert code here to initialize your application
  }

  func applicationWillTerminate(_ aNotification: Notification) {
    // Insert code here to tear down your application
  }
}

{'repo_name': 'onmyway133/XcodeWay', 'stars': '511', 'repo_language': 'Swift', 'file_name': 'XcodeWayScript.scpt', 'mime_type': 'text/plain', 'hash': -8360573176411124801, 'source_dataset': 'data'}


[gd_scene load_steps=2 format=2]

[ext_resource path="res://world/props/Platform.tscn" type="PackedScene" id=1]

[node name="RedPlatform" instance=ExtResource( 1 )]

{'repo_name': 'GDQuest/godot-kickstarter-2019', 'stars': '159', 'repo_language': 'GDScript', 'file_name': 'distant_platforms_1.png.import', 'mime_type': 'text/plain', 'hash': 5330862446768054208, 'source_dataset': 'data'}


using System.Collections.Generic;
using System.Drawing;
using System.IO;
using Kontract.Image;
using Kontract.Image.Swizzle;
using Kontract.IO;

/*Original image and data types by xdaniel and his tool Tharsis
 * https://github.com/xdanieldzd/Tharsis */

namespace image_ctxb
{
    public class CTXB
    {
        public Header header;
        List<Chunk> chunks = new List<Chunk>();

        public List<Bitmap> bmps = new List<Bitmap>();
        public List<ImageSettings> settingsList = new List<ImageSettings>();

        public CTXB(Stream input)
        {
            using (var br = new BinaryReaderX(input))
            {
                //Header
                header = br.ReadStruct<Header>();

                //Chunks
                for (int i = 0; i < header.chunkCount; i++)
                    chunks.Add(new Chunk(br.BaseStream));

                br.BaseStream.Position = header.texDataOffset;
                for (int i = 0; i < header.chunkCount; i++)
                {
                    for (int j = 0; j < chunks[i].texCount; j++)
                    {
                        var settings = new ImageSettings
                        {
                            Width = chunks[i].textures[j].width,
                            Height = chunks[i].textures[j].height,
                            Format = Support.Format[(uint)((chunks[i].textures[j].dataType << 16) | chunks[i].textures[j].imageFormat)],
                            Swizzle = new CTRSwizzle(chunks[i].textures[j].width, chunks[i].textures[j].height)
                        };

                        settingsList.Add(settings);
                        bmps.Add(Kontract.Image.Common.Load(br.ReadBytes(chunks[i].textures[j].dataLength), settings));
                    }
                }
            }
        }

        public void Save(string filename)
        {
            using (BinaryWriterX bw = new BinaryWriterX(File.Create(filename)))
            {
                bw.BaseStream.Position = header.texDataOffset;
                var count = 0;
                for (int i = 0; i < header.chunkCount; i++)
                {
                    for (int j = 0; j < chunks[i].texCount; j++)
                    {
                        settingsList[count] = new ImageSettings
                        {
                            Width = bmps[count].Width,
                            Height = bmps[count].Height,
                            Format = Support.Format[chunks[i].textures[j].imageFormat],
                            Swizzle = new CTRSwizzle(bmps[count].Width, bmps[count].Height)
                        };

                        var resBmp = Kontract.Image.Common.Save(bmps[count], settingsList[count]);
                        bw.Write(resBmp);

                        chunks[i].textures[j].dataLength = resBmp.Length;
                        chunks[i].textures[j].height = (ushort)bmps[count].Height;
                        chunks[i].textures[j].width = (ushort)bmps[count].Width;

                        count++;
                    }
                }

                //Ctxb Header
                header.fileSize = (uint)bw.BaseStream.Length;
                bw.BaseStream.Position = 0;
                bw.WriteStruct(header);

                //Chunks
                for (int i = 0; i < header.chunkCount; i++)
                {
                    chunks[i].Write(bw.BaseStream);
                    for (int j = 0; j < chunks[i].texCount; j++)
                    {
                        bw.WriteStruct(chunks[i].textures[j]);
                    }
                }
            }
        }
    }
}

{'repo_name': 'IcySon55/Kuriimu', 'stars': '203', 'repo_language': 'C#', 'file_name': 'AssemblyInfo.cs', 'mime_type': 'text/plain', 'hash': -6067022254233505744, 'source_dataset': 'data'}


package Mojolicious::Command::test;
use Mojo::Base 'Mojolicious::Command';

use Getopt::Long qw(GetOptionsFromArray :config no_auto_abbrev no_ignore_case);

has description => 'Run tests';
has usage => sub { shift->extract_usage };

sub run {
  my ($self, @args) = @_;

  GetOptionsFromArray \@args, 'v|verbose' => \$ENV{HARNESS_VERBOSE};

  if (!@args && (my $home = $self->app->home)) {
    die "Can't find test directory.\n" unless -d $home->rel_dir('t');
    my $files = $home->list_files('t');
    /\.t$/ and push @args, $home->rel_file("t/$_") for @$files;
    say qq{Running tests from "}, $home->rel_dir('t') . '".';
  }

  $ENV{HARNESS_OPTIONS} //= 'c';
  require Test::Harness;
  local $Test::Harness::switches = '';
  Test::Harness::runtests(sort @args);
}

1;

=encoding utf8

=head1 NAME

Mojolicious::Command::test - Test command

=head1 SYNOPSIS

  Usage: APPLICATION test [OPTIONS] [TESTS]

    ./myapp.pl test
    ./myapp.pl test t/foo.t
    ./myapp.pl test -v t/foo/*.t

  Options:
    -v, --verbose   Print verbose debug information to STDERR

=head1 DESCRIPTION

L<Mojolicious::Command::test> runs application tests from the C<t> directory.

This is a core command, that means it is always enabled and its code a good
example for learning to build new commands, you're welcome to fork it.

See L<Mojolicious::Commands/"COMMANDS"> for a list of commands that are
available by default.

=head1 ATTRIBUTES

L<Mojolicious::Command::test> inherits all attributes from
L<Mojolicious::Command> and implements the following new ones.

=head2 description

  my $description = $test->description;
  $test           = $test->description('Foo');

Short description of this command, used for the command list.

=head2 usage

  my $usage = $test->usage;
  $test     = $test->usage('Foo');

Usage information for this command, used for the help screen.

=head1 METHODS

L<Mojolicious::Command::test> inherits all methods from L<Mojolicious::Command>
and implements the following new ones.

=head2 run

  $test->run(@ARGV);

Run this command.

=head1 SEE ALSO

L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicio.us>.

=cut

{'repo_name': 'mozilla/arewefastyet', 'stars': '116', 'repo_language': 'JavaScript', 'file_name': 'data.py', 'mime_type': 'text/x-python', 'hash': 5585186594964041588, 'source_dataset': 'data'}


'use strict'

const Promise = require('bluebird')
const fs = Promise.promisifyAll(require('fs-extra'))
const pm2 = Promise.promisifyAll(require('pm2'))
const ora = require('ora')
const path = require('path')

const ROOTPATH = process.cwd()

module.exports = {
  /**
   * Detect the most appropriate start mode
   */
  startDetect: function () {
    if (process.env.WIKI_JS_HEROKU) {
      return this.startInHerokuMode()
    } else {
      return this.startInBackgroundMode()
    }
  },
  /**
   * Start in background mode
   */
  startInBackgroundMode: function () {
    let spinner = ora('Initializing...').start()
    return fs.emptyDirAsync(path.join(ROOTPATH, './logs')).then(() => {
      return pm2.connectAsync().then(() => {
        return pm2.startAsync({
          name: 'wiki',
          script: 'server',
          cwd: ROOTPATH,
          output: path.join(ROOTPATH, './logs/wiki-output.log'),
          error: path.join(ROOTPATH, './logs/wiki-error.log'),
          minUptime: 5000,
          maxRestarts: 5
        }).then(() => {
          spinner.succeed('Wiki.js has started successfully.')
        }).finally(() => {
          pm2.disconnect()
        })
      })
    }).catch(err => {
      spinner.fail(err)
      process.exit(1)
    })
  },
  /**
   * Start in Heroku mode
   */
  startInHerokuMode: function () {
    console.warn('Incorrect command on Heroku, use instead: node server')
    process.exit(1)
  },
  /**
   * Stop Wiki.js process(es)
   */
  stop () {
    let spinner = ora('Shutting down Wiki.js...').start()
    return pm2.connectAsync().then(() => {
      return pm2.stopAsync('wiki').then(() => {
        spinner.succeed('Wiki.js has stopped successfully.')
      }).finally(() => {
        pm2.disconnect()
      })
    }).catch(err => {
      spinner.fail(err)
      process.exit(1)
    })
  },
  /**
   * Restart Wiki.js process(es)
   */
  restart: function () {
    let self = this
    return self.stop().delay(1000).then(() => {
      self.startDetect()
    })
  },
  /**
   * Start the web-based configuration wizard
   *
   * @param {Number} port Port to bind the HTTP server on
   */
  configure (port) {
    port = port || 3000
    let spinner = ora('Initializing interactive setup...').start()
    require('./configure')(port, spinner)
  }
}

{'repo_name': 'Requarks/wiki-v1', 'stars': '107', 'repo_language': 'CSS', 'file_name': 'index.pug', 'mime_type': 'text/plain', 'hash': -354767607937747864, 'source_dataset': 'data'}


# -*- mode: snippet -*-
# key: select
# contributor: Translated from TextMate Snippet
# name: Select Box
# --
<select name="${1:some_name}" id="$0">
<option value="${2:value1}">${2:$(yas/substr yas-text "[^ ]*")}</option>
<option value="${3:value2}">${3:$(yas/substr yas-text "[^ ]*")}</option>
</select>

{'repo_name': 'redguardtoo/emacs.d', 'stars': '1738', 'repo_language': 'Emacs Lisp', 'file_name': 'defvar.yasnippet', 'mime_type': 'text/plain', 'hash': -535654833415385720, 'source_dataset': 'data'}


import pandas as pd
import pandas.util.testing as tm
from pandas import compat
from pandas.io.sas import XportReader, read_sas
import numpy as np
import os

# CSV versions of test XPT files were obtained using the R foreign library

# Numbers in a SAS xport file are always float64, so need to convert
# before making comparisons.
def numeric_as_float(data):
    for v in data.columns:
        if data[v].dtype is np.dtype('int64'):
            data[v] = data[v].astype(np.float64)

class TestXport(tm.TestCase):

    def setUp(self):
        self.dirpath = tm.get_data_path()
        self.file01 = os.path.join(self.dirpath, "DEMO_G.XPT")
        self.file02 = os.path.join(self.dirpath, "SSHSV1_A.XPT")
        self.file03 = os.path.join(self.dirpath, "DRXFCD_G.XPT")

    def test1(self):
        # Tests with DEMO_G.XPT (all numeric file)

        # Compare to this
        data_csv = pd.read_csv(self.file01.replace(".XPT", ".csv"))
        numeric_as_float(data_csv)

        # Read full file
        data = XportReader(self.file01).read()
        tm.assert_frame_equal(data, data_csv)

        # Test incremental read with `read` method.
        reader = XportReader(self.file01)
        data = reader.read(10)
        tm.assert_frame_equal(data, data_csv.iloc[0:10, :])

        # Test incremental read with `get_chunk` method.
        reader = XportReader(self.file01, chunksize=10)
        data = reader.get_chunk()
        tm.assert_frame_equal(data, data_csv.iloc[0:10, :])

        # Read full file with `read_sas` method
        data = read_sas(self.file01)
        tm.assert_frame_equal(data, data_csv)

    def test1_index(self):
        # Tests with DEMO_G.XPT using index (all numeric file)

        # Compare to this
        data_csv = pd.read_csv(self.file01.replace(".XPT", ".csv"))
        data_csv = data_csv.set_index("SEQN")
        numeric_as_float(data_csv)

        # Read full file
        data = XportReader(self.file01, index="SEQN").read()
        tm.assert_frame_equal(data, data_csv)

        # Test incremental read with `read` method.
        reader = XportReader(self.file01, index="SEQN")
        data = reader.read(10)
        tm.assert_frame_equal(data, data_csv.iloc[0:10, :])

        # Test incremental read with `get_chunk` method.
        reader = XportReader(self.file01, index="SEQN", chunksize=10)
        data = reader.get_chunk()
        tm.assert_frame_equal(data, data_csv.iloc[0:10, :])

    def test1_incremental(self):
        # Test with DEMO_G.XPT, reading full file incrementally

        data_csv = pd.read_csv(self.file01.replace(".XPT", ".csv"))
        data_csv = data_csv.set_index("SEQN")
        numeric_as_float(data_csv)

        reader = XportReader(self.file01, index="SEQN", chunksize=1000)

        all_data = [x for x in reader]
        data = pd.concat(all_data, axis=0)

        tm.assert_frame_equal(data, data_csv)

    def test2(self):
        # Test with SSHSV1_A.XPT

        # Compare to this
        data_csv = pd.read_csv(self.file02.replace(".XPT", ".csv"))
        numeric_as_float(data_csv)

        data = XportReader(self.file02).read()
        tm.assert_frame_equal(data, data_csv)

    def test3(self):
        # Test with DRXFCD_G.XPT (contains text and numeric variables)

        # Compare to this
        data_csv = pd.read_csv(self.file03.replace(".XPT", ".csv"))

        data = XportReader(self.file03).read()
        tm.assert_frame_equal(data, data_csv)

        data = read_sas(self.file03)
        tm.assert_frame_equal(data, data_csv)

{'repo_name': 'pyparallel/pyparallel', 'stars': '566', 'repo_language': 'Python', 'file_name': 'wininst-7.1.vcproj', 'mime_type': 'text/xml', 'hash': 1378366311428135140, 'source_dataset': 'data'}


'use strict'

/*
 * adonis-lucid
 *
 * (c) Harminder Virk <virk@adonisjs.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
*/

const test = require('japa')
const fs = require('fs-extra')
const path = require('path')

const helpers = require('../unit/helpers')

const { db, Models, Model } = require('../../')({
  connection: 'testing',
  testing: helpers.getConfig()
})

test.group('Database', (group) => {
  group.before(async () => {
    await fs.ensureDir(path.join(__dirname, '../unit/tmp'))
    await helpers.createCollections(db)
  })

  group.beforeEach(() => {
    Models.clear()
  })

  group.afterEach(async () => {
    await db.collection('users').delete()
    await db.collection('profiles').delete()
  })

  group.after(async () => {
    await helpers.dropCollections(db)
    try {
      await fs.remove(path.join(__dirname, './tmp'))
    } catch (error) {
      if (process.platform !== 'win32' || error.code !== 'EBUSY') {
        throw error
      }
    }
  }).timeout(0)

  test('should be able to make queries via database provider', async (assert) => {
    const users = await db.collection('users').find()
    assert.deepEqual(users, [])
  })

  test('should be able to define models', async (assert) => {
    class User extends Model {
    }
    Models.add('User', User)
    const users = await Models.get('User').all()
    assert.deepEqual(users.rows, [])
  })

  test('should be able to define relations', async (assert) => {
    class Profile extends Model {
    }

    class User extends Model {
      profile () {
        return this.hasOne(Models.get('Profile'))
      }
    }

    Models.add('Profile', Profile)
    Models.add('User', User)

    const userResult = await db.collection('users').insert({ username: 'virk' })
    await db.collection('profiles').insert({ profile_name: 'virk', user_id: userResult.insertedIds[0] })

    const user = await Models.get('User').find(userResult.insertedIds[0])
    assert.instanceOf(user, User)
    assert.equal(String(user._id), String(userResult.insertedIds[0]))

    const profile = await user.profile().fetch()
    assert.instanceOf(profile, Profile)
    assert.equal(String(profile.user_id), String(userResult.insertedIds[0]))
  })

  test('define hooks', async (assert) => {
    const stack = []

    class User extends Model {
      profile () {
        return this.hasOne(Models.get('Profile'))
      }

      static boot () {
        super.boot()
        this.addHook('beforeCreate', async () => {
          stack.push('beforeCreate called')
        })
      }
    }

    Models.add('User', User)
    const user = new (Models.get('User'))()
    user.username = 'virk'
    await user.save()
    assert.deepEqual(stack, ['beforeCreate called'])
  })
})

{'repo_name': 'duyluonglc/lucid-mongo', 'stars': '287', 'repo_language': 'JavaScript', 'file_name': 'BaseMigration.js', 'mime_type': 'text/plain', 'hash': 2122855891917112904, 'source_dataset': 'data'}


"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var parser_1 = require("../parser");
var expression_1 = require("../expression");
var escapes = [
    [/\\n/g, '\n'],
    [/\\r/g, '\r'],
    [/\\t/g, '\t']
];
exports.register = function (reg, _a) {
    var set = _a.set;
    var processElmx = function (elmx) { return set('elm', parser_1.default(elmx)); };
    reg(/^processing (.*)$/, processElmx);
    reg(/^processing$/, processElmx);
    var parse = function (expr) {
        return set('expr', expression_1.parse(escapes.reduce(function (e, _a) {
            var f = _a[0], r = _a[1];
            return e.replace(f, r);
        }, expr)));
    };
    reg(/^parsing '(.*)'$/, parse);
};

{'repo_name': 'pzavolinsky/elmx', 'stars': '338', 'repo_language': 'JavaScript', 'file_name': 'types.js', 'mime_type': 'text/plain', 'hash': -3830499210428706034, 'source_dataset': 'data'}


/*!
 * @license
 * Copyright 2019 Alfresco Software, Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { AspectOrientedConfigService } from './aspect-oriented-config.service';
import { AspectOrientedConfig, Property, OrganisedPropertyGroup, PropertyGroupContainer } from '../../interfaces/content-metadata.interfaces';

describe('AspectOrientedConfigService', () => {

    let configService: AspectOrientedConfigService;

    function createConfigService(configObj: AspectOrientedConfig) {
        return new AspectOrientedConfigService(configObj);
    }

    describe('reorganiseByConfig', () => {

        interface TestCase {
            name: string;
            config: AspectOrientedConfig;
            expectations: OrganisedPropertyGroup[];
        }

        const property1 = <Property> { name: 'property1' },
            property2 = <Property> { name: 'property2' },
            property3 = <Property> { name: 'property3' },
            property4 = <Property> { name: 'property4' };

        const propertyGroups: PropertyGroupContainer = {
            berseria: { title: 'Berseria', description: '', name: 'berseria', properties: { property1, property2 } },
            zestiria: { title: 'Zestiria', description: '', name: 'zestiria', properties: { property3, property4 } }
        };

        const testCases: TestCase[] = [
            {
                name: 'Empty config',
                config: {},
                expectations: []
            },
            {
                name: 'One property from One group',
                config: {
                    'berseria': [ 'property1' ]
                },
                expectations: [{
                    title: 'Berseria',
                    properties: [ property1 ]
                }]
            },
            {
                name: 'More properties from One group',
                config: {
                    'berseria': [ 'property1', 'property2' ]
                },
                expectations: [{
                    title: 'Berseria',
                    properties: [ property1, property2 ]
                }]
            },
            {
                name: 'One-one properties from More group',
                config: {
                    'berseria': [ 'property1' ],
                    'zestiria': [ 'property3' ]
                },
                expectations: [
                    {
                        title: 'Berseria',
                        properties: [ property1 ]
                    },
                    {
                        title: 'Zestiria',
                        properties: [ property3 ]
                    }
                ]
            },
            {
                name: 'More properties from More groups',
                config: {
                    'zestiria': [ 'property4', 'property3' ],
                    'berseria': [ 'property2', 'property1' ]
                },
                expectations: [
                    {
                        title: 'Zestiria',
                        properties: [ property4, property3 ]
                    },
                    {
                        title: 'Berseria',
                        properties: [ property2, property1 ]
                    }
                ]
            },
            {
                name: 'Wildcard',
                config: {
                    'berseria': '*',
                    'zestiria': [ 'property4' ]
                },
                expectations: [
                    {
                        title: 'Berseria',
                        properties: [ property1, property2 ]
                    },
                    {
                        title: 'Zestiria',
                        properties: [ property4 ]
                    }
                ]
            },
            {
                name: 'Not existing group',
                config: {
                    'berseria': '*',
                    'not-existing-group': '*',
                    'zestiria': [ 'property4' ]
                },
                expectations: [
                    {
                        title: 'Berseria',
                        properties: [ property1, property2 ]
                    },
                    {
                        title: 'Zestiria',
                        properties: [ property4 ]
                    }
                ]
            },
            {
                name: 'Not existing property',
                config: {
                    'berseria': [ 'not-existing-property' ],
                    'zestiria': [ 'property4' ]
                },
                expectations: [
                    {
                        title: 'Zestiria',
                        properties: [ property4 ]
                    }
                ]
            }
        ];

        testCases.forEach((testCase) => {
            it(`should pass for: ${testCase.name}`, () => {
                configService = createConfigService(testCase.config);

                const organisedPropertyGroups = configService.reorganiseByConfig(propertyGroups);

                expect(organisedPropertyGroups.length).toBe(testCase.expectations.length, 'Group count should match');
                testCase.expectations.forEach((expectation, i) => {
                    expect(organisedPropertyGroups[i].title).toBe(expectation.title, 'Group\'s title should match' );
                    expect(organisedPropertyGroups[i].properties.length).toBe(
                        expectation.properties.length,
                        `Property count for "${organisedPropertyGroups[i].title}" group should match.`
                    );

                    expectation.properties.forEach((property, j) => {
                        expect(organisedPropertyGroups[i].properties[j]).toBe(property, `Property should match ${property.name}`);
                    });
                });
            });
        });
    });

    describe('appendAllPreset', () => {

        const property1 = <Property> { name: 'property1' },
            property2 = <Property> { name: 'property2' },
            property3 = <Property> { name: 'property3' },
            property4 = <Property> { name: 'property4' };

        const propertyGroups: PropertyGroupContainer = {
            berseria: { title: 'Berseria', description: '', name: 'berseria', properties: { property1, property2 } },
            zestiria: { title: 'Zestiria', description: '', name: 'zestiria', properties: { property3, property4 } }
        };

        it(`should return all the propertyGorups`, () => {
            const testCase = {
                name: 'Not existing property',
                config: {
                    includeAll: true
                },
                expectations: [
                    {
                        title: 'Berseria',
                        properties: [ property1, property2 ]
                    },
                    {
                        title: 'Zestiria',
                        properties: [ property3, property4 ]
                    }
                ]
            };
            configService = createConfigService(testCase.config);

            const organisedPropertyGroups = configService.appendAllPreset(propertyGroups);

            expect(organisedPropertyGroups.length).toBe(testCase.expectations.length, 'Group count should match');
            testCase.expectations.forEach((expectation, i) => {
                expect(organisedPropertyGroups[i].title).toBe(expectation.title, 'Group\'s title should match' );
                expect(organisedPropertyGroups[i].properties.length).toBe(
                    expectation.properties.length,
                    `Property count for "${organisedPropertyGroups[i].title}" group should match.`
                );

                expectation.properties.forEach((property, j) => {
                    expect(organisedPropertyGroups[i].properties[j]).toBe(property, `Property should match ${property.name}`);
                });
            });
        });

        it(`should set as readOnly the properties defined in the config inside readOnlyAspects`, () => {
            const testCase = {
                name: 'Not existing property',
                config: {
                    includeAll: true,
                    readOnlyAspects: ['berseria'],
                    readOnlyProperties: ['property3']
                },
                expectations: [
                    {
                        title: 'Berseria',
                        properties: [ property1, property2 ]
                    },
                    {
                        title: 'Zestiria',
                        properties: [ property3, property4 ]
                    }
                ]
            };
            configService = createConfigService(testCase.config);

            const organisedPropertyGroups = configService.appendAllPreset(propertyGroups);

            expect(organisedPropertyGroups.length).toBe(testCase.expectations.length, 'Group count should match');
            expect(organisedPropertyGroups[0].properties[0].editable).toBe(false);
            expect(organisedPropertyGroups[0].properties[1].editable).toBe(false);
            expect(organisedPropertyGroups[1].properties[0].editable).toBe(false);
            expect(organisedPropertyGroups[1].properties[1].editable).toBe(undefined);
        });
    });
});

{'repo_name': 'Alfresco/alfresco-ng2-components', 'stars': '244', 'repo_language': 'TypeScript', 'file_name': 'app.e2e-spec.e2e.ts', 'mime_type': 'text/x-java', 'hash': 6900773320819374010, 'source_dataset': 'data'}


/*
 * Copyright 2020 ThoughtWorks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import m from "mithril";
import Stream from "mithril/stream";
import * as Buttons from "views/components/buttons";
import {Modal, Size} from "views/components/modal";
import {OperationState} from "views/pages/page_operations";

export class ToggleConfirmModal extends Modal {
  private readonly message: m.Children;
  private readonly modalTitle: string;
  private readonly confirmAction: string;
  private onsave: () => Promise<any>;
  private ajaxOperationMonitor = Stream<OperationState>(OperationState.UNKNOWN);

  constructor(message: m.Children,
              onsave: () => Promise<any>,
              title         = "Are you sure?",
              confirmAction = "Save") {
    super(Size.small);
    this.message       = message;
    this.modalTitle    = title;
    this.onsave        = onsave;
    this.confirmAction = confirmAction;
  }

  body(): m.Children {
    return <div>{this.message}</div>;
  }

  title(): string {
    return this.modalTitle;
  }

  buttons(): m.ChildArray {
    return [
      <Buttons.Primary data-test-id="button-save"
                       ajaxOperationMonitor={this.ajaxOperationMonitor}
                       ajaxOperation={this.onsave.bind(this)}>{this.confirmAction}</Buttons.Primary>,
      <Buttons.Cancel data-test-id="button-cancel"
                      ajaxOperationMonitor={this.ajaxOperationMonitor}
                      onclick={this.close.bind(this)}>Cancel</Buttons.Cancel>
    ];
  }
}

{'repo_name': 'gocd/gocd', 'stars': '5700', 'repo_language': 'Java', 'file_name': 'message.properties', 'mime_type': 'text/plain', 'hash': 2184449489118119295, 'source_dataset': 'data'}


<resources>
    <dimen name="fab_margin">16dp</dimen>
    <dimen name="bottom_sheet_dialog_width">0dp</dimen>
</resources>

{'repo_name': 'sromku/android-storage', 'stars': '821', 'repo_language': 'Java', 'file_name': 'StorageTestCase.java', 'mime_type': 'text/x-java', 'hash': -5070922974622463138, 'source_dataset': 'data'}


package misspell

import (
	"bufio"
	"bytes"
	"io"
	"regexp"
	"strings"
	"text/scanner"
)

func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func inArray(haystack []string, needle string) bool {
	for _, word := range haystack {
		if needle == word {
			return true
		}
	}
	return false
}

var wordRegexp = regexp.MustCompile(`[a-zA-Z0-9']+`)

// Diff is datastructure showing what changed in a single line
type Diff struct {
	Filename  string
	FullLine  string
	Line      int
	Column    int
	Original  string
	Corrected string
}

// Replacer is the main struct for spelling correction
type Replacer struct {
	Replacements []string
	Debug        bool
	engine       *StringReplacer
	corrected    map[string]string
}

// New creates a new default Replacer using the main rule list
func New() *Replacer {
	r := Replacer{
		Replacements: DictMain,
	}
	r.Compile()
	return &r
}

// RemoveRule deletes existings rules.
// TODO: make inplace to save memory
func (r *Replacer) RemoveRule(ignore []string) {
	newwords := make([]string, 0, len(r.Replacements))
	for i := 0; i < len(r.Replacements); i += 2 {
		if inArray(ignore, r.Replacements[i]) {
			continue
		}
		newwords = append(newwords, r.Replacements[i:i+2]...)
	}
	r.engine = nil
	r.Replacements = newwords
}

// AddRuleList appends new rules.
// Input is in the same form as Strings.Replacer: [ old1, new1, old2, new2, ....]
// Note: does not check for duplictes
func (r *Replacer) AddRuleList(additions []string) {
	r.engine = nil
	r.Replacements = append(r.Replacements, additions...)
}

// Compile compiles the rules.  Required before using the Replace functions
func (r *Replacer) Compile() {

	r.corrected = make(map[string]string, len(r.Replacements)/2)
	for i := 0; i < len(r.Replacements); i += 2 {
		r.corrected[r.Replacements[i]] = r.Replacements[i+1]
	}
	r.engine = NewStringReplacer(r.Replacements...)
}

/*
line1 and line2 are different
extract words from each line1

replace word -> newword
if word == new-word
  continue
if new-word in list of replacements
  continue
new word not original, and not in list of replacements
  some substring got mixed up.  UNdo
*/
func (r *Replacer) recheckLine(s string, lineNum int, buf io.Writer, next func(Diff)) {
	first := 0
	redacted := RemoveNotWords(s)

	idx := wordRegexp.FindAllStringIndex(redacted, -1)
	for _, ab := range idx {
		word := s[ab[0]:ab[1]]
		newword := r.engine.Replace(word)
		if newword == word {
			// no replacement done
			continue
		}

		// ignore camelCase words
		// https://github.com/client9/misspell/issues/113
		if CaseStyle(word) == CaseUnknown {
			continue
		}

		if StringEqualFold(r.corrected[strings.ToLower(word)], newword) {
			// word got corrected into something we know
			io.WriteString(buf, s[first:ab[0]])
			io.WriteString(buf, newword)
			first = ab[1]
			next(Diff{
				FullLine:  s,
				Line:      lineNum,
				Original:  word,
				Corrected: newword,
				Column:    ab[0],
			})
			continue
		}
		// Word got corrected into something unknown. Ignore it
	}
	io.WriteString(buf, s[first:])
}

// ReplaceGo is a specialized routine for correcting Golang source
// files.  Currently only checks comments, not identifiers for
// spelling.
func (r *Replacer) ReplaceGo(input string) (string, []Diff) {
	var s scanner.Scanner
	s.Init(strings.NewReader(input))
	s.Mode = scanner.ScanIdents | scanner.ScanFloats | scanner.ScanChars | scanner.ScanStrings | scanner.ScanRawStrings | scanner.ScanComments
	lastPos := 0
	output := ""
Loop:
	for {
		switch s.Scan() {
		case scanner.Comment:
			origComment := s.TokenText()
			newComment := r.engine.Replace(origComment)

			if origComment != newComment {
				// s.Pos().Offset is the end of the current token
				// subtract len(origComment) to get the start of the token
				offset := s.Pos().Offset
				output = output + input[lastPos:offset-len(origComment)] + newComment
				lastPos = offset
			}
		case scanner.EOF:
			break Loop
		}
	}

	if lastPos == 0 {
		// no changes, no copies
		return input, nil
	}
	if lastPos < len(input) {
		output = output + input[lastPos:]
	}
	diffs := make([]Diff, 0, 8)
	buf := bytes.NewBuffer(make([]byte, 0, max(len(input), len(output))+100))
	// faster that making a bytes.Buffer and bufio.ReadString
	outlines := strings.SplitAfter(output, "\n")
	inlines := strings.SplitAfter(input, "\n")
	for i := 0; i < len(inlines); i++ {
		if inlines[i] == outlines[i] {
			buf.WriteString(outlines[i])
			continue
		}
		r.recheckLine(inlines[i], i+1, buf, func(d Diff) {
			diffs = append(diffs, d)
		})
	}

	return buf.String(), diffs

}

// Replace is corrects misspellings in input, returning corrected version
//  along with a list of diffs.
func (r *Replacer) Replace(input string) (string, []Diff) {
	output := r.engine.Replace(input)
	if input == output {
		return input, nil
	}
	diffs := make([]Diff, 0, 8)
	buf := bytes.NewBuffer(make([]byte, 0, max(len(input), len(output))+100))
	// faster that making a bytes.Buffer and bufio.ReadString
	outlines := strings.SplitAfter(output, "\n")
	inlines := strings.SplitAfter(input, "\n")
	for i := 0; i < len(inlines); i++ {
		if inlines[i] == outlines[i] {
			buf.WriteString(outlines[i])
			continue
		}
		r.recheckLine(inlines[i], i+1, buf, func(d Diff) {
			diffs = append(diffs, d)
		})
	}

	return buf.String(), diffs
}

// ReplaceReader applies spelling corrections to a reader stream.  Diffs are
// emitted through a callback.
func (r *Replacer) ReplaceReader(raw io.Reader, w io.Writer, next func(Diff)) error {
	var (
		err     error
		line    string
		lineNum int
	)
	reader := bufio.NewReader(raw)
	for err == nil {
		lineNum++
		line, err = reader.ReadString('\n')

		// if it's EOF, then line has the last line
		// don't like the check of err here and
		// in for loop
		if err != nil && err != io.EOF {
			return err
		}
		// easily 5x faster than regexp+map
		if line == r.engine.Replace(line) {
			io.WriteString(w, line)
			continue
		}
		// but it can be inaccurate, so we need to double check
		r.recheckLine(line, lineNum, w, next)
	}
	return nil
}

{'repo_name': 'akshaykarle/terraform-provider-mongodbatlas', 'stars': '124', 'repo_language': 'Go', 'file_name': 'project.html.markdown', 'mime_type': 'text/plain', 'hash': -2032430000214721279, 'source_dataset': 'data'}


syntax = "proto3";

package envoy.config.filter.http.csrf.v2;

import "envoy/api/v2/core/base.proto";
import "envoy/type/matcher/string.proto";

import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.config.filter.http.csrf.v2";
option java_outer_classname = "CsrfProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.csrf.v3";
option (udpa.annotations.file_status).package_version_status = FROZEN;

// [#protodoc-title: CSRF]
// Cross-Site Request Forgery :ref:`configuration overview <config_http_filters_csrf>`.
// [#extension: envoy.filters.http.csrf]

// CSRF filter config.
message CsrfPolicy {
  // Specifies the % of requests for which the CSRF filter is enabled.
  //
  // If :ref:`runtime_key <envoy_api_field_core.RuntimeFractionalPercent.runtime_key>` is specified,
  // Envoy will lookup the runtime key to get the percentage of requests to filter.
  //
  // .. note::
  //
  //   This field defaults to 100/:ref:`HUNDRED
  //   <envoy_api_enum_type.FractionalPercent.DenominatorType>`.
  api.v2.core.RuntimeFractionalPercent filter_enabled = 1
      [(validate.rules).message = {required: true}];

  // Specifies that CSRF policies will be evaluated and tracked, but not enforced.
  //
  // This is intended to be used when ``filter_enabled`` is off and will be ignored otherwise.
  //
  // If :ref:`runtime_key <envoy_api_field_core.RuntimeFractionalPercent.runtime_key>` is specified,
  // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate
  // and track the request's *Origin* and *Destination* to determine if it's valid, but will not
  // enforce any policies.
  api.v2.core.RuntimeFractionalPercent shadow_enabled = 2;

  // Specifies additional source origins that will be allowed in addition to
  // the destination origin.
  //
  // More information on how this can be configured via runtime can be found
  // :ref:`here <csrf-configuration>`.
  repeated type.matcher.StringMatcher additional_origins = 3;
}

{'repo_name': 'datawire/ambassador', 'stars': '2837', 'repo_language': 'Python', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -946093424367970490, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="tw__allow_btn_txt">Salli</string>
    <string name="tw__login_btn_txt">Kirjaudu Twitter-tunnuksellasi</string>
    <string name="tw__not_now_btn_txt">Ei nyt</string>
    <string name="tw__share_email_desc">Salli kohteen %1$s käyttää Twitter-tiliisi liitettyä sähköpostiosoitetta \@%2$s, jotta %1$s voi käyttää sitä yksityisyyskäytäntönsä mukaisesti. %1$s voi esimerkiksi lähettää sinulle päivityksiä ja muuta tietoa kyseiseen osoitteeseen.</string>
    <string name="tw__share_email_title">Jaa sähköpostiosoitteesi</string>
</resources>

{'repo_name': 'typesdk/TypeSDK', 'stars': '144', 'repo_language': 'HTML', 'file_name': 'int.js', 'mime_type': 'text/plain', 'hash': 3908380634126020654, 'source_dataset': 'data'}


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3615628651990492675
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 2884580647323923220}
  m_Layer: 0
  m_Name: Spotlight_01b
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &2884580647323923220
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 3615628651990492675}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children:
  - {fileID: 8864834622078052951}
  - {fileID: 4284347996942521181}
  - {fileID: 6337384388063458172}
  m_Father: {fileID: 0}
  m_RootOrder: 0
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &866896330313595767
PrefabInstance:
  m_ObjectHideFlags: 0
  serializedVersion: 2
  m_Modification:
    m_TransformParent: {fileID: 2884580647323923220}
    m_Modifications:
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalPosition.x
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalPosition.y
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalPosition.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalRotation.x
      value: -0.7071067
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalRotation.y
      value: -0
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalRotation.z
      value: -0
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalRotation.w
      value: 0.70710695
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_RootOrder
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalEulerAnglesHint.x
      value: -90
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalEulerAnglesHint.y
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_LocalEulerAnglesHint.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 7104975159769254344, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_Name
      value: Light_Spot_800lm
      objectReference: {fileID: 0}
    - target: {fileID: 7104975159769254344, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_StaticEditorFlags
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 9203907179793585638, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_BoundingSphereOverride.x
      value: 5.7e-43
      objectReference: {fileID: 0}
    - target: {fileID: 9203907179793585638, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_BoundingSphereOverride.y
      value: 1.4675487e-24
      objectReference: {fileID: 0}
    - target: {fileID: 9203907179793585638, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_BoundingSphereOverride.z
      value: 5.7e-43
      objectReference: {fileID: 0}
    - target: {fileID: 9203907179793585638, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_BoundingSphereOverride.w
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 9203907179793585638, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_Shadows.m_Type
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 9203907179793585638, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
      propertyPath: m_UseViewFrustumForShadowCasterCull
      value: 1
      objectReference: {fileID: 0}
    m_RemovedComponents: []
  m_SourcePrefab: {fileID: 100100000, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
--- !u!4 &4284347996942521181 stripped
Transform:
  m_CorrespondingSourceObject: {fileID: 3995495870832584746, guid: ac937fd9ae94a3a40b3a7185b6b1f0e2, type: 3}
  m_PrefabInstance: {fileID: 866896330313595767}
  m_PrefabAsset: {fileID: 0}
--- !u!1001 &5012268597102460092
PrefabInstance:
  m_ObjectHideFlags: 0
  serializedVersion: 2
  m_Modification:
    m_TransformParent: {fileID: 2884580647323923220}
    m_Modifications:
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalPosition.x
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalPosition.y
      value: 0.0073
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalPosition.z
      value: -0
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalRotation.x
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalRotation.y
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalRotation.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalRotation.w
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_RootOrder
      value: 2
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalEulerAnglesHint.x
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalEulerAnglesHint.y
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_LocalEulerAnglesHint.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 7097592091236896670, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_Name
      value: Light_Point_Hotspot_Small
      objectReference: {fileID: 0}
    - target: {fileID: 7097592091236896670, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
      propertyPath: m_StaticEditorFlags
      value: 0
      objectReference: {fileID: 0}
    m_RemovedComponents: []
  m_SourcePrefab: {fileID: 100100000, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
--- !u!4 &6337384388063458172 stripped
Transform:
  m_CorrespondingSourceObject: {fileID: 1332447828416647104, guid: 428831fe459a18c49843bfc3af65bbc9, type: 3}
  m_PrefabInstance: {fileID: 5012268597102460092}
  m_PrefabAsset: {fileID: 0}
--- !u!1001 &7307427868896330599
PrefabInstance:
  m_ObjectHideFlags: 0
  serializedVersion: 2
  m_Modification:
    m_TransformParent: {fileID: 2884580647323923220}
    m_Modifications:
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalPosition.x
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalPosition.y
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalPosition.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalRotation.x
      value: -0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalRotation.y
      value: -0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalRotation.z
      value: -0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalRotation.w
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_RootOrder
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalEulerAnglesHint.x
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalEulerAnglesHint.y
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalEulerAnglesHint.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalScale.x
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalScale.y
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_LocalScale.z
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 2897031892463655715, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_Name
      value: Spotlight_Spot_01b
      objectReference: {fileID: 0}
    - target: {fileID: 2897031892463655715, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
      propertyPath: m_StaticEditorFlags
      value: 0
      objectReference: {fileID: 0}
    m_RemovedComponents: []
  m_SourcePrefab: {fileID: 100100000, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
--- !u!4 &8864834622078052951 stripped
Transform:
  m_CorrespondingSourceObject: {fileID: 2192983573132273968, guid: 43a2c40dd5bb4f6449d77cd82d533131, type: 3}
  m_PrefabInstance: {fileID: 7307427868896330599}
  m_PrefabAsset: {fileID: 0}

{'repo_name': 'Unity-Technologies/Graphics', 'stars': '309', 'repo_language': 'C#', 'file_name': 'Decal_All_SG.mat', 'mime_type': 'text/plain', 'hash': -3269126208166879120, 'source_dataset': 'data'}


# assertions
--
    import "github.com/smartystreets/assertions"

Package assertions contains the implementations for all assertions which are
referenced in goconvey's `convey` package
(github.com/smartystreets/goconvey/convey) and gunit
(github.com/smartystreets/gunit) for use with the So(...) method. They can also
be used in traditional Go test functions and even in applications.

Many of the assertions lean heavily on work done by Aaron Jacobs in his
excellent oglematchers library. (https://github.com/jacobsa/oglematchers) The
ShouldResemble assertion leans heavily on work done by Daniel Jacques in his
very helpful go-render library. (https://github.com/luci/go-render)

## Usage

#### func  GoConveyMode

```go
func GoConveyMode(yes bool)
```
GoConveyMode provides control over JSON serialization of failures. When using
the assertions in this package from the convey package JSON results are very
helpful and can be rendered in a DIFF view. In that case, this function will be
called with a true value to enable the JSON serialization. By default, the
assertions in this package will not serializer a JSON result, making standalone
ussage more convenient.

#### func  ShouldAlmostEqual

```go
func ShouldAlmostEqual(actual interface{}, expected ...interface{}) string
```
ShouldAlmostEqual makes sure that two parameters are close enough to being
equal. The acceptable delta may be specified with a third argument, or a very
small default delta will be used.

#### func  ShouldBeBetween

```go
func ShouldBeBetween(actual interface{}, expected ...interface{}) string
```
ShouldBeBetween receives exactly three parameters: an actual value, a lower
bound, and an upper bound. It ensures that the actual value is between both
bounds (but not equal to either of them).

#### func  ShouldBeBetweenOrEqual

```go
func ShouldBeBetweenOrEqual(actual interface{}, expected ...interface{}) string
```
ShouldBeBetweenOrEqual receives exactly three parameters: an actual value, a
lower bound, and an upper bound. It ensures that the actual value is between
both bounds or equal to one of them.

#### func  ShouldBeBlank

```go
func ShouldBeBlank(actual interface{}, expected ...interface{}) string
```
ShouldBeBlank receives exactly 1 string parameter and ensures that it is equal
to "".

#### func  ShouldBeChronological

```go
func ShouldBeChronological(actual interface{}, expected ...interface{}) string
```
ShouldBeChronological receives a []time.Time slice and asserts that the are in
chronological order starting with the first time.Time as the earliest.

#### func  ShouldBeEmpty

```go
func ShouldBeEmpty(actual interface{}, expected ...interface{}) string
```
ShouldBeEmpty receives a single parameter (actual) and determines whether or not
calling len(actual) would return `0`. It obeys the rules specified by the len
function for determining length: http://golang.org/pkg/builtin/#len

#### func  ShouldBeFalse

```go
func ShouldBeFalse(actual interface{}, expected ...interface{}) string
```
ShouldBeFalse receives a single parameter and ensures that it is false.

#### func  ShouldBeGreaterThan

```go
func ShouldBeGreaterThan(actual interface{}, expected ...interface{}) string
```
ShouldBeGreaterThan receives exactly two parameters and ensures that the first
is greater than the second.

#### func  ShouldBeGreaterThanOrEqualTo

```go
func ShouldBeGreaterThanOrEqualTo(actual interface{}, expected ...interface{}) string
```
ShouldBeGreaterThanOrEqualTo receives exactly two parameters and ensures that
the first is greater than or equal to the second.

#### func  ShouldBeIn

```go
func ShouldBeIn(actual interface{}, expected ...interface{}) string
```
ShouldBeIn receives at least 2 parameters. The first is a proposed member of the
collection that is passed in either as the second parameter, or of the
collection that is comprised of all the remaining parameters. This assertion
ensures that the proposed member is in the collection (using ShouldEqual).

#### func  ShouldBeLessThan

```go
func ShouldBeLessThan(actual interface{}, expected ...interface{}) string
```
ShouldBeLessThan receives exactly two parameters and ensures that the first is
less than the second.

#### func  ShouldBeLessThanOrEqualTo

```go
func ShouldBeLessThanOrEqualTo(actual interface{}, expected ...interface{}) string
```
ShouldBeLessThan receives exactly two parameters and ensures that the first is
less than or equal to the second.

#### func  ShouldBeNil

```go
func ShouldBeNil(actual interface{}, expected ...interface{}) string
```
ShouldBeNil receives a single parameter and ensures that it is nil.

#### func  ShouldBeTrue

```go
func ShouldBeTrue(actual interface{}, expected ...interface{}) string
```
ShouldBeTrue receives a single parameter and ensures that it is true.

#### func  ShouldBeZeroValue

```go
func ShouldBeZeroValue(actual interface{}, expected ...interface{}) string
```
ShouldBeZeroValue receives a single parameter and ensures that it is the Go
equivalent of the default value, or "zero" value.

#### func  ShouldContain

```go
func ShouldContain(actual interface{}, expected ...interface{}) string
```
ShouldContain receives exactly two parameters. The first is a slice and the
second is a proposed member. Membership is determined using ShouldEqual.

#### func  ShouldContainKey

```go
func ShouldContainKey(actual interface{}, expected ...interface{}) string
```
ShouldContainKey receives exactly two parameters. The first is a map and the
second is a proposed key. Keys are compared with a simple '=='.

#### func  ShouldContainSubstring

```go
func ShouldContainSubstring(actual interface{}, expected ...interface{}) string
```
ShouldContainSubstring receives exactly 2 string parameters and ensures that the
first contains the second as a substring.

#### func  ShouldEndWith

```go
func ShouldEndWith(actual interface{}, expected ...interface{}) string
```
ShouldEndWith receives exactly 2 string parameters and ensures that the first
ends with the second.

#### func  ShouldEqual

```go
func ShouldEqual(actual interface{}, expected ...interface{}) string
```
ShouldEqual receives exactly two parameters and does an equality check.

#### func  ShouldEqualTrimSpace

```go
func ShouldEqualTrimSpace(actual interface{}, expected ...interface{}) string
```
ShouldEqualTrimSpace receives exactly 2 string parameters and ensures that the
first is equal to the second after removing all leading and trailing whitespace
using strings.TrimSpace(first).

#### func  ShouldEqualWithout

```go
func ShouldEqualWithout(actual interface{}, expected ...interface{}) string
```
ShouldEqualWithout receives exactly 3 string parameters and ensures that the
first is equal to the second after removing all instances of the third from the
first using strings.Replace(first, third, "", -1).

#### func  ShouldHappenAfter

```go
func ShouldHappenAfter(actual interface{}, expected ...interface{}) string
```
ShouldHappenAfter receives exactly 2 time.Time arguments and asserts that the
first happens after the second.

#### func  ShouldHappenBefore

```go
func ShouldHappenBefore(actual interface{}, expected ...interface{}) string
```
ShouldHappenBefore receives exactly 2 time.Time arguments and asserts that the
first happens before the second.

#### func  ShouldHappenBetween

```go
func ShouldHappenBetween(actual interface{}, expected ...interface{}) string
```
ShouldHappenBetween receives exactly 3 time.Time arguments and asserts that the
first happens between (not on) the second and third.

#### func  ShouldHappenOnOrAfter

```go
func ShouldHappenOnOrAfter(actual interface{}, expected ...interface{}) string
```
ShouldHappenOnOrAfter receives exactly 2 time.Time arguments and asserts that
the first happens on or after the second.

#### func  ShouldHappenOnOrBefore

```go
func ShouldHappenOnOrBefore(actual interface{}, expected ...interface{}) string
```
ShouldHappenOnOrBefore receives exactly 2 time.Time arguments and asserts that
the first happens on or before the second.

#### func  ShouldHappenOnOrBetween

```go
func ShouldHappenOnOrBetween(actual interface{}, expected ...interface{}) string
```
ShouldHappenOnOrBetween receives exactly 3 time.Time arguments and asserts that
the first happens between or on the second and third.

#### func  ShouldHappenWithin

```go
func ShouldHappenWithin(actual interface{}, expected ...interface{}) string
```
ShouldHappenWithin receives a time.Time, a time.Duration, and a time.Time (3
arguments) and asserts that the first time.Time happens within or on the
duration specified relative to the other time.Time.

#### func  ShouldHaveLength

```go
func ShouldHaveLength(actual interface{}, expected ...interface{}) string
```
ShouldHaveLength receives 2 parameters. The first is a collection to check the
length of, the second being the expected length. It obeys the rules specified by
the len function for determining length: http://golang.org/pkg/builtin/#len

#### func  ShouldHaveSameTypeAs

```go
func ShouldHaveSameTypeAs(actual interface{}, expected ...interface{}) string
```
ShouldHaveSameTypeAs receives exactly two parameters and compares their
underlying types for equality.

#### func  ShouldImplement

```go
func ShouldImplement(actual interface{}, expectedList ...interface{}) string
```
ShouldImplement receives exactly two parameters and ensures that the first
implements the interface type of the second.

#### func  ShouldNotAlmostEqual

```go
func ShouldNotAlmostEqual(actual interface{}, expected ...interface{}) string
```
ShouldNotAlmostEqual is the inverse of ShouldAlmostEqual

#### func  ShouldNotBeBetween

```go
func ShouldNotBeBetween(actual interface{}, expected ...interface{}) string
```
ShouldNotBeBetween receives exactly three parameters: an actual value, a lower
bound, and an upper bound. It ensures that the actual value is NOT between both
bounds.

#### func  ShouldNotBeBetweenOrEqual

```go
func ShouldNotBeBetweenOrEqual(actual interface{}, expected ...interface{}) string
```
ShouldNotBeBetweenOrEqual receives exactly three parameters: an actual value, a
lower bound, and an upper bound. It ensures that the actual value is nopt
between the bounds nor equal to either of them.

#### func  ShouldNotBeBlank

```go
func ShouldNotBeBlank(actual interface{}, expected ...interface{}) string
```
ShouldNotBeBlank receives exactly 1 string parameter and ensures that it is
equal to "".

#### func  ShouldNotBeEmpty

```go
func ShouldNotBeEmpty(actual interface{}, expected ...interface{}) string
```
ShouldNotBeEmpty receives a single parameter (actual) and determines whether or
not calling len(actual) would return a value greater than zero. It obeys the
rules specified by the `len` function for determining length:
http://golang.org/pkg/builtin/#len

#### func  ShouldNotBeIn

```go
func ShouldNotBeIn(actual interface{}, expected ...interface{}) string
```
ShouldNotBeIn receives at least 2 parameters. The first is a proposed member of
the collection that is passed in either as the second parameter, or of the
collection that is comprised of all the remaining parameters. This assertion
ensures that the proposed member is NOT in the collection (using ShouldEqual).

#### func  ShouldNotBeNil

```go
func ShouldNotBeNil(actual interface{}, expected ...interface{}) string
```
ShouldNotBeNil receives a single parameter and ensures that it is not nil.

#### func  ShouldNotContain

```go
func ShouldNotContain(actual interface{}, expected ...interface{}) string
```
ShouldNotContain receives exactly two parameters. The first is a slice and the
second is a proposed member. Membership is determinied using ShouldEqual.

#### func  ShouldNotContainKey

```go
func ShouldNotContainKey(actual interface{}, expected ...interface{}) string
```
ShouldNotContainKey receives exactly two parameters. The first is a map and the
second is a proposed absent key. Keys are compared with a simple '=='.

#### func  ShouldNotContainSubstring

```go
func ShouldNotContainSubstring(actual interface{}, expected ...interface{}) string
```
ShouldNotContainSubstring receives exactly 2 string parameters and ensures that
the first does NOT contain the second as a substring.

#### func  ShouldNotEndWith

```go
func ShouldNotEndWith(actual interface{}, expected ...interface{}) string
```
ShouldEndWith receives exactly 2 string parameters and ensures that the first
does not end with the second.

#### func  ShouldNotEqual

```go
func ShouldNotEqual(actual interface{}, expected ...interface{}) string
```
ShouldNotEqual receives exactly two parameters and does an inequality check.

#### func  ShouldNotHappenOnOrBetween

```go
func ShouldNotHappenOnOrBetween(actual interface{}, expected ...interface{}) string
```
ShouldNotHappenOnOrBetween receives exactly 3 time.Time arguments and asserts
that the first does NOT happen between or on the second or third.

#### func  ShouldNotHappenWithin

```go
func ShouldNotHappenWithin(actual interface{}, expected ...interface{}) string
```
ShouldNotHappenWithin receives a time.Time, a time.Duration, and a time.Time (3
arguments) and asserts that the first time.Time does NOT happen within or on the
duration specified relative to the other time.Time.

#### func  ShouldNotHaveSameTypeAs

```go
func ShouldNotHaveSameTypeAs(actual interface{}, expected ...interface{}) string
```
ShouldNotHaveSameTypeAs receives exactly two parameters and compares their
underlying types for inequality.

#### func  ShouldNotImplement

```go
func ShouldNotImplement(actual interface{}, expectedList ...interface{}) string
```
ShouldNotImplement receives exactly two parameters and ensures that the first
does NOT implement the interface type of the second.

#### func  ShouldNotPanic

```go
func ShouldNotPanic(actual interface{}, expected ...interface{}) (message string)
```
ShouldNotPanic receives a void, niladic function and expects to execute the
function without any panic.

#### func  ShouldNotPanicWith

```go
func ShouldNotPanicWith(actual interface{}, expected ...interface{}) (message string)
```
ShouldNotPanicWith receives a void, niladic function and expects to recover a
panic whose content differs from the second argument.

#### func  ShouldNotPointTo

```go
func ShouldNotPointTo(actual interface{}, expected ...interface{}) string
```
ShouldNotPointTo receives exactly two parameters and checks to see that they
point to different addresess.

#### func  ShouldNotResemble

```go
func ShouldNotResemble(actual interface{}, expected ...interface{}) string
```
ShouldNotResemble receives exactly two parameters and does an inverse deep equal
check (see reflect.DeepEqual)

#### func  ShouldNotStartWith

```go
func ShouldNotStartWith(actual interface{}, expected ...interface{}) string
```
ShouldNotStartWith receives exactly 2 string parameters and ensures that the
first does not start with the second.

#### func  ShouldPanic

```go
func ShouldPanic(actual interface{}, expected ...interface{}) (message string)
```
ShouldPanic receives a void, niladic function and expects to recover a panic.

#### func  ShouldPanicWith

```go
func ShouldPanicWith(actual interface{}, expected ...interface{}) (message string)
```
ShouldPanicWith receives a void, niladic function and expects to recover a panic
with the second argument as the content.

#### func  ShouldPointTo

```go
func ShouldPointTo(actual interface{}, expected ...interface{}) string
```
ShouldPointTo receives exactly two parameters and checks to see that they point
to the same address.

#### func  ShouldResemble

```go
func ShouldResemble(actual interface{}, expected ...interface{}) string
```
ShouldResemble receives exactly two parameters and does a deep equal check (see
reflect.DeepEqual)

#### func  ShouldStartWith

```go
func ShouldStartWith(actual interface{}, expected ...interface{}) string
```
ShouldStartWith receives exactly 2 string parameters and ensures that the first
starts with the second.

#### func  So

```go
func So(actual interface{}, assert assertion, expected ...interface{}) (bool, string)
```
So is a convenience function (as opposed to an inconvenience function?) for
running assertions on arbitrary arguments in any context, be it for testing or
even application logging. It allows you to perform assertion-like behavior (and
get nicely formatted messages detailing discrepancies) but without the program
blowing up or panicking. All that is required is to import this package and call
`So` with one of the assertions exported by this package as the second
parameter. The first return parameter is a boolean indicating if the assertion
was true. The second return parameter is the well-formatted message showing why
an assertion was incorrect, or blank if the assertion was correct.

Example:

    if ok, message := So(x, ShouldBeGreaterThan, y); !ok {
         log.Println(message)
    }

#### type Assertion

```go
type Assertion struct {
}
```

#### func  New

```go
func New(t testingT) *Assertion
```
New swallows the *testing.T struct and prints failed assertions using t.Error.
Example: assertions.New(t).So(1, should.Equal, 1)

#### func (*Assertion) Failed

```go
func (this *Assertion) Failed() bool
```
Failed reports whether any calls to So (on this Assertion instance) have failed.

#### func (*Assertion) So

```go
func (this *Assertion) So(actual interface{}, assert assertion, expected ...interface{}) bool
```
So calls the standalone So function and additionally, calls t.Error in failure
scenarios.

#### type FailureView

```go
type FailureView struct {
	Message  string `json:"Message"`
	Expected string `json:"Expected"`
	Actual   string `json:"Actual"`
}
```

This struct is also declared in
github.com/smartystreets/goconvey/convey/reporting. The json struct tags should
be equal in both declarations.

#### type Serializer

```go
type Serializer interface {
	// contains filtered or unexported methods
}
```

{'repo_name': 'purpleworks/delibird', 'stars': '243', 'repo_language': 'HTML', 'file_name': 'main_test.go', 'mime_type': 'text/plain', 'hash': -1800273676901526867, 'source_dataset': 'data'}