text:
//>>built
define("dojo/cldr/nls/el/currency",{"AUD_displayName":"Δολάριο Αυστραλίας","CAD_displayName":"Δολάριο Καναδά","CHF_displayName":"Φράγκο Ελβετίας","CNY_displayName":"Γιουάν Ρενμίμπι Κίνας","EUR_displayName":"Ευρώ","GBP_displayName":"Λίρα Στερλίνα Βρετανίας","HKD_displayName":"Δολάριο Χονγκ Κονγκ","JPY_displayName":"Γιεν Ιαπωνίας","USD_displayName":"Δολάριο ΗΠΑ","USD_symbol":"$"});


text:
RubyLint.registry.register('RUBY_VERSION') do |defs|
  defs.define_constant('RUBY_VERSION') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

  end
end

redpajama_set_name: RedPajamaGithub


text:
import subprocess
import tempfile
import shutil
import os
import random
import string

_tempDir = None

def setUp():
    global _tempDir
    assert _tempDir is None
    _tempDir = tempfile.mkdtemp()

def tearDown():
    global _tempDir
    shutil.rmtree(_tempDir, ignore_errors=True)
    assert _tempDir is not None
    _tempDir = None

def githubRootURL():
    global _tempDir
    assert _tempDir is not None
    return "file://" + _tempDir + "/github"

def localClonesDir():
    global _tempDir
    assert _tempDir is not None
    return os.path.join(_tempDir, "localclone")

def _run(command, cwd):
    try:
        return subprocess.check_output(
            command, shell=True, cwd=cwd, stderr=subprocess.STDOUT, close_fds=True)
    except subprocess.CalledProcessError as e:
        print e.output
        raise

class GitWrapper:
    def __init__(self, directory):
        self._directory = directory

    def directory(self):
        return self._directory

    def run(self, command):
        return _run(command=command, cwd=self._directory)

    def hash(self, branch='HEAD'):
        return self.run("git rev-parse " + branch).strip()

    def manifestFilename(self):
        return os.path.join(self._directory, "upseto.manifest")

    def writeFile(self, relativePath, content):
        path = os.path.join(self.directory(), relativePath)
        if not os.path.isdir(os.path.dirname(path)):
            os.makedirs(os.path.dirname(path))
        with open(path, "w") as f:
            f.write(content)

    def readFile(self, relativePath):
        with open(os.path.join(self.directory(), relativePath)) as f:
            return f.read()

    def fileExists(self, relativePath):
        path = os.path.join(self.directory(), relativePath)
        return os.path.exists(path)

class GitHub(GitWrapper):
    def __init__(self, name):
        assert _tempDir is not None
        directory = os.path.join(_tempDir, "github", name)
        os.makedirs(directory)
        GitWrapper.__init__(self, directory)
        self.run("git init")
        self.run("git config user.email 'you@example.com'")
        self.run("git config user.name 'Your Name'")
        randomContent = ''.join(
            random.choice(string.ascii_letters) for i in xrange(10))
        self._write(".gitignore", "build\n")
        self._write("firstCommitFile", randomContent)
        self.run("git add firstCommitFile .gitignore")
        self.run("git commit -m 'Initial commit'")
        self.run("git checkout -b dont_hold_master")

    def _write(self, filename, content):
        with open(os.path.join(self.directory(), filename), "w") as f:
            f.write(content)

    def url(self):
        return "file://" + self.directory()

class LocalClone(GitWrapper):
    def __init__(self, gitHub):
        assert _tempDir is not None
        directory = os.path.join(
            localClonesDir(), os.path.basename(gitHub.directory()))
        if not os.path.isdir(localClonesDir()):
            os.makedirs(localClonesDir())
        _run("git clone %s" % gitHub.url(), cwd=localClonesDir())
        GitWrapper.__init__(self, directory)
        self.run("git checkout master")
        self.run("git config user.email 'you@example.com'")
        self.run("git config user.name 'Your Name'")

    def createAddCommitPush(self, filename):
        randomContent = ''.join(
            random.choice(string.ascii_letters) for i in xrange(10))
        with open(os.path.join(self.directory(), filename), "w") as f:
            f.write(randomContent)
        self.addCommitPush(filename)

    def addCommitPush(self, filename):
        self.run("git add %s" % filename)
        self.run("git commit -m 'a commit'")
        self.run("git push")

    def addCommitPushManifest(self):
        self.addCommitPush('upseto.manifest')

    def checkout(self, branch):
        self.run("git checkout " + branch)

    def shortStatus(self):
        return self.run("git status -s")


text:
<!DOCTYPE HTML>
<title>Test for privacy restrictions on :visited (Bug 147777)</title>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Lycoperdon compressum Lloyd

### Remarks
null


text:
/* vim: set expandtab ts=4 sw=4: */
/*
 * You may redistribute this program and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation,
 * either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "admin/Admin.h"
#include "benc/String.h"
#include "benc/Dict.h"
#include "exception/Except.h"
#include "exception/Jmp.h"
#include "util/log/Log.h"
#include "util/Security.h"

struct Context
{
    struct Log* logger;
    struct Admin* admin;
};

static void sendError(char* errorMessage, String* txid, struct Admin* admin)
{
    Dict error = Dict_CONST(String_CONST("error"), String_OBJ(String_CONST(errorMessage)), NULL);
    Admin_sendMessage(&error, txid, admin);
}

static void setUser(Dict* args, void* vcontext, String* txid, struct Allocator* requestAlloc)
{
    struct Context* const ctx = (struct Context*) vcontext;
    struct Jmp jmp;
    Jmp_try(jmp) {
        String* user = Dict_getString(args, String_CONST("user"));
        Security_setUser(user->bytes, ctx->logger, &jmp.handler);
    } Jmp_catch {
        sendError(jmp.message, txid, ctx->admin);
        return;
    }
    sendError("none", txid, ctx->admin);
}

static void dropPermissions(Dict* args, void* vctx, String* txid, struct Allocator* requestAlloc)
{
    struct Context* const ctx = (struct Context*) vctx;
    struct Jmp jmp;
    Jmp_try(jmp) {
        Security_dropPermissions(requestAlloc, ctx->logger, &jmp.handler);
    } Jmp_catch {
        sendError(jmp.message, txid, ctx->admin);
        return;
    }
    sendError("none", txid, ctx->admin);
}

static void checkPermissionsB(struct Except* eh,
                              String* txid,
                              struct Admin* admin,
                              struct Allocator* requestAlloc)
{
    struct Security_Permissions* sp = Security_checkPermissions(requestAlloc, eh);
    Dict* out = Dict_new(requestAlloc);
    Dict_putInt(out, String_CONST("noOpenFiles"), sp->noOpenFiles, requestAlloc);
    Dict_putInt(out, String_CONST("seccompExists"), sp->seccompExists, requestAlloc);
    Dict_putInt(out, String_CONST("seccompEnforcing"), sp->seccompEnforcing, requestAlloc);
    Dict_putInt(out, String_CONST("memoryLimitBytes"), sp->memoryLimitBytes, requestAlloc);
    Dict_putString(out, String_CONST("error"), String_CONST("none"), requestAlloc);
    Admin_sendMessage(out, txid, admin);
}

static void checkPermissions(Dict* args, void* vctx, String* txid, struct Allocator* requestAlloc)
{
    struct Context* const ctx = (struct Context*) vctx;
    struct Jmp jmp;
    Jmp_try(jmp) {
        checkPermissionsB(&jmp.handler, txid, ctx->admin, requestAlloc);
    } Jmp_catch {
        sendError(jmp.message, txid, ctx->admin);
        return;
    }
}

void Security_admin_register(struct Allocator* alloc, struct Log* logger, struct Admin* admin)
{
    struct Context* ctx = Allocator_clone(alloc, (&(struct Context) {
        .logger = logger,
        .admin = admin
    }));
    struct Admin_FunctionArg setUserArgs[] = {
        { .name = "user", .required = 1, .type = "String" }
    };
    Admin_registerFunction("Security_setUser", setUser, ctx, true, setUserArgs, admin);
    Admin_registerFunction("Security_dropPermissions", dropPermissions, ctx, true, NULL, admin);
    Admin_registerFunction("Security_checkPermissions", checkPermissions, ctx, true, NULL, admin);
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>org.bzewdu.tools.perftrend.chartdataset</title>
<meta name="date" content="2013-10-20">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

org.bzewdu.tools.perftrend.chartdataset

Classes

LineXYDataset

ScatterXYDataset


text:
module Formol
  class Poll < ActiveRecord::Base
    #Exceptions
    class PollException < Exception; end
    class TooManyVotesError < PollException; end
    class UserAlreadyVoter < PollException; end
    class NoOptionProvided < PollException; end
    class TopicLockedError < PollException; end
    class PollExpiredError < PollException; end

    #Security
    attr_protected  :topic_id
    attr_readonly   :topic_id

    #Virtual attributes
    attr_accessor :poll_vote_ids #to not conflict with has_many :votes

    #Default values
    default_value_for :duration,    1.week.to_i
    default_value_for :max_options, 1 #default to single mode

    #Associations
    belongs_to  :topic

    has_many  :options
    has_many  :votes,   :through    => :options
    has_many  :voters,  :through    => :votes,
                        :class_name => Formol.config.user_class,
                        :uniq       => true

    #Nested attributes
    accepts_nested_attributes_for :options, :limit => 20

    #Validations
    validates :topic,       :presence     => true
    validates :question,    :presence     => true,
                            :length       => {  :in                     => 5..64,
                                                :allow_blank            => true }
    validates :duration,    :presence     => true,
                            :numericality => {  :only_integer           => true,
                                                :greater_than           => 0,
                                                :less_than              => 3.months.to_i,
                                                :allow_blank            => true }
    validates :max_options, :presence     => true,
                            :numericality => {  :only_integer           => true,
                                                :greater_than           => 0,
                                                :less_than_or_equal_to  => Proc.new{ |p| p.options.length },
                                                :allow_blank            => true }
    validates :options,     :length       => { :in                      => 1..20 }

    #Normalization
    normalize_attribute :question,  :with => [:squish, :blank]

    #Callbacks
    before_validation :setup_options_assoc, :on => :create

    #Business methods

    def multiple?
      max_options > 1
    end

    def single?
      !multiple?
    end

    def expired?
      expires_at < Time.now
    end

    def expires_at
      created_at + duration.to_i
    end

    def voted?(user)
      voters.include?(user)
    end

    def vote(user, option_ids)
      option_ids = [option_ids] unless option_ids.respond_to?(:each)
      option_ids.reject!(&:blank?)
      option_ids.compact!

      raise NoOptionProvided.new if option_ids.empty?
      raise TooManyVotesError.new if option_ids.length > max_options
      raise UserAlreadyVoter.new if voted?(user)
      raise TopicLockedError.new if topic.locked?
      raise PollExpiredError.new if expired?

      options.find(option_ids).to_a.each do |option| #?
        option.votes.create!(:voter => user)
      end
    end

    private

    #Callback methods

    # set poll for each options
    # AR doesn't do it by itself and it ruins validations
    def setup_options_assoc
      options.each do |o|
        o.poll = self
      end
    end
  end
end


text:
/*
 * 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.
 */
package io.prestosql.spi.block;

import org.testng.annotations.Test;

import static io.prestosql.spi.type.BooleanType.BOOLEAN;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;

public class TestFixedWidthBlockBuilder
{
    private static final int BOOLEAN_ENTRY_SIZE = BOOLEAN.getFixedSize() + Byte.BYTES; // value + isNull
    private static final int EXPECTED_ENTRY_COUNT = 3;

    @Test
    public void testFixedBlockIsFull()
    {
        testIsFull(new PageBuilderStatus(BOOLEAN_ENTRY_SIZE * EXPECTED_ENTRY_COUNT));
    }

    private static void testIsFull(PageBuilderStatus pageBuilderStatus)
    {
        FixedWidthBlockBuilder blockBuilder = new FixedWidthBlockBuilder(BOOLEAN.getFixedSize(), pageBuilderStatus.createBlockBuilderStatus(), 1024);
        assertTrue(pageBuilderStatus.isEmpty());
        while (!pageBuilderStatus.isFull()) {
            BOOLEAN.writeBoolean(blockBuilder, true);
        }
        assertEquals(blockBuilder.getPositionCount(), EXPECTED_ENTRY_COUNT);
        assertEquals(pageBuilderStatus.isFull(), true);
    }
}


text:
from urllib.request import urlopen
import json

url = 'https://btc-e.com/api/2/btc_usd/ticker'
response = urlopen(url)
data = json.loads(response.read().decode())

tds = ['last', 'buy', 'sell', 'high', 'low', 'vol']
for t in tds:
    print(data['ticker'][t])


text:
<?php
declare(strict_types=1);

namespace Gdbots\Pbj\Type;

final class SignedTinyIntType extends AbstractIntType
{
    public function getMin(): int
    {
        return -128;
    }

    public function getMax(): int
    {
        return 127;
    }
}


text:
#include <time.h>
#include <stdio.h>
#include <langinfo.h>
#include "locale_impl.h"
#include "atomic.h"

char *__asctime_r(const struct tm *restrict tm, char *restrict buf)
{
	if (snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
		__nl_langinfo_l(ABDAY_1+tm->tm_wday, C_LOCALE),
		__nl_langinfo_l(ABMON_1+tm->tm_mon, C_LOCALE),
		tm->tm_mday, tm->tm_hour,
		tm->tm_min, tm->tm_sec,
		1900 + tm->tm_year) >= 26)
	{
		/* ISO C requires us to use the above format string,
		 * even if it will not fit in the buffer. Thus asctime_r
		 * is _supposed_ to crash if the fields in tm are too large.
		 * We follow this behavior and crash "gracefully" to warn
		 * application developers that they may not be so lucky
		 * on other implementations (e.g. stack smashing..).
		 */
		a_crash();
	}
	return buf;
}

weak_alias(__asctime_r, asctime_r);


text:
// $Id: ossimVisitor.h 22790 2014-05-16 19:19:30Z gpotts $

#ifndef ossimVisitor_HEADER
#define ossimVisitor_HEADER 1
#include <ossim/base/ossimObject.h>
#include <ossim/base/ossimString.h>
#include <ossim/base/ossimId.h>
#include <ossim/base/ossimEvent.h>
#include <ossim/base/ossimRefPtr.h>
#include <set>
#include <vector>

class ossimConnectableObject;

class OSSIM_DLL ossimVisitor : public ossimReferenced
{
public:
   typedef std::set<ossimRefPtr<ossimObject> >    MarkCollectionRef;
   typedef std::set<ossimRefPtr<ossimObject> >    CollectionRef;
   typedef std::vector<ossimRefPtr<ossimObject> > ListRef;
   typedef std::set<ossimObject*>                 Collection;
   typedef std::vector<ossimObject* >             List;
   /**
    * Enumeration type can be a mask and will traverse a graph of connectables based on the values.
    */
   enum VisitorType
   {
      VISIT_NONE     = 0,
      VISIT_CHILDREN = 1,
      VISIT_INPUTS   = 2,
      VISIT_OUTPUTS  = 4,
      VISIT_ALL      = (VISIT_CHILDREN|VISIT_INPUTS|VISIT_OUTPUTS)
   };

   ossimVisitor(int visitorType = VISIT_NONE);
   ossimVisitor(const ossimVisitor& src);
   virtual void reset();
   virtual ossimRefPtr<ossimVisitor> dup()const=0;
   virtual void visit(ossimObject* obj);
   virtual void visit(ossimConnectableObject* obj);
   VisitorType getVisitorType()const;
   void setVisitorType(int vType, bool on=true);
   void turnOffVisitorType(int vType);
   bool hasVisited(ossimObject* obj)const;
   bool stopTraversal()const;
protected:
   VisitorType            m_visitorType;
   mutable Collection     m_markNode;
   mutable bool           m_stopTraversalFlag;
};

class OSSIM_DLL ossimCollectionVisitor : public ossimVisitor
{
public:
   ossimCollectionVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
   ossimCollectionVisitor(const ossimCollectionVisitor& src);
   ListRef& getObjects();
   const ListRef& getObjects()const;
   ossimObject* getObject(ossim_uint32 idx = 0);
   const ossimObject* getObject(ossim_uint32 idx = 0)const;

   // Inlined to force template instantiation.
   template <class T> T* getObjectAs(ossim_uint32 idx=0)
   {
      if(idx < m_collection.size())
      {
         return dynamic_cast<T*>(m_collection[idx].get());
      }
      return 0;
   }

   // Inlined to force template instantiation.
   template<class T> const T* getObjectAs(ossim_uint32 idx=0)const
   {
      if(idx < m_collection.size())
      {
         return dynamic_cast<const T*>(m_collection[idx].get());
      }
      return 0;
   }

   virtual void reset();

protected:
   ListRef m_collection;

};

template<class T>
class OSSIM_DLL ossimTypeVisitor : public ossimVisitor
{
public:
   ossimTypeVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN))
   :ossimVisitor(visitorType)
   {}
   virtual ossimRefPtr<ossimVisitor> dup()const
   {
      return new ossimTypeVisitor(*this);
   }
   virtual void visit(ossimConnectableObject* obj)
   {
      T* tempObj = dynamic_cast<T*>(obj);
      if(tempObj)
      {
         m_list.push_back(tempObj);
      }
   }
   ossim_int32 getSize()const
   {
      return m_list.size();
   }
   T* getObject(ossim_int32 idx)
   {
      return m_list[idx];
   }
   const T* getObject(ossim_int32 idx)const
   {
      return m_list[idx];
   }
   virtual void reset()
   {
      m_list.clear();
   }

protected:
   std::vector<T*> m_list;
};

class OSSIM_DLL ossimIdVisitor : public ossimVisitor
{
public:
   /**
    * @brief Default constructor
    * Constructs with id of 0 and vistor type of VISIT_INPUTS|VISIT_CHILDREN.
    */
   ossimIdVisitor();

   ossimIdVisitor(int visitorType);
   ossimIdVisitor(const ossimId& id, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
   ossimIdVisitor(const ossimIdVisitor& src);

   virtual ossimRefPtr<ossimVisitor> dup()const;
   virtual void visit(ossimConnectableObject* obj);

   /** @brief Resets m_object to 0, calls ossimVisitor::reset(). */
   virtual void reset();

   ossimConnectableObject* getObject();
   const ossimConnectableObject* getObject()const;
   void setId(const ossimId& id);
   const ossimId& getId()const;
protected:
   ossimConnectableObject* m_object;
   ossimId m_id;
};

class OSSIM_DLL ossimTypeNameVisitor : public ossimCollectionVisitor
{
public:
   ossimTypeNameVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
   ossimTypeNameVisitor(const ossimString& typeName, bool firstofTypeFlag=false, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
   ossimTypeNameVisitor(const ossimTypeNameVisitor& src);
   virtual ossimRefPtr<ossimVisitor> dup()const;
   virtual void visit(ossimObject* obj);
   void setTypeName(const ossimString& typeName);
   const ossimString& getTypeName()const;

   /**
    * @brief Set the m_firstOfTypeFlag.
    *
    * @param flag If flag is true, ossimTypeNameVisitor::visit will stop traversing if it
    * finds an object of m_typeName.
    */
   void setFirstOfTypeFlag(bool flag);

   /** @return m_firstOfTypeFlag */
   bool getFirstOfTypeFlag() const;

protected:
   ossimString m_typeName;
   bool        m_firstOfTypeFlag;
};

class OSSIM_DLL ossimTypeIdVisitor : public ossimCollectionVisitor
{
public:
   ossimTypeIdVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
   ossimTypeIdVisitor(const RTTItypeid& typeId, bool firstofTypeFlag=false, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
   ossimTypeIdVisitor(const ossimTypeIdVisitor& src);
   virtual ossimRefPtr<ossimVisitor> dup()const;
   virtual void visit(ossimObject* obj);
   void setTypeId(const RTTItypeid& typeId);
   const RTTItypeid& getTypeId()const;
protected:
   RTTItypeid m_typeId;
   bool        m_firstOfTypeFlag;
};

class OSSIM_DLL ossimEventVisitor : public ossimVisitor
{
public:
   ossimEventVisitor(ossimEvent* evt,
                      int visitorType =(VISIT_OUTPUTS|VISIT_CHILDREN));
   ossimEventVisitor(const ossimEventVisitor& src);
   virtual ossimRefPtr<ossimVisitor> dup()const;
   virtual void visit(ossimObject* obj);

protected:
   ossimRefPtr<ossimEvent> m_event;

};

/**
 * @class ossimViewInterfaceVisitor
 *
 * Visitor to update view and then propagate property event to outputs.
 */
class OSSIM_DLL ossimViewInterfaceVisitor : public ossimVisitor
{
public:
   ossimViewInterfaceVisitor(ossimObject* view,
                             int visitorType =(VISIT_OUTPUTS|VISIT_CHILDREN));
   ossimViewInterfaceVisitor(const ossimViewInterfaceVisitor& src);
   virtual ossimRefPtr<ossimVisitor> dup()const;

   /**
    * @brief Calls ossimViewInterface::setView if obj cast to
    * ossimViewInterface*.  On success a property event is sent to
    * output side so that things like ossimCombiner can reinitialize if
    * needed.
    *
    * @param obj Object to visit.
    */
   virtual void visit(ossimObject* obj);

   ossimObject* getView();
   const ossimObject* getView()const;
protected:
   ossimRefPtr<ossimObject> m_view;
};

/**
 * @class ossimSourceInitializeVisitor
 *
 * Visitor to update view and then propagate property event to outputs.
 */
class OSSIM_DLL ossimSourceInitializeVisitor : public ossimVisitor
{
public:
   ossimSourceInitializeVisitor(int visitorType = VISIT_OUTPUTS);
   ossimSourceInitializeVisitor(const ossimSourceInitializeVisitor& src);
   virtual ossimRefPtr<ossimVisitor> dup()const;

   /**
    * @brief Calls ossimViewInterface::setView if obj cast to
    * ossimViewInterface*.  On success a property event is sent to
    * output side so that things like ossimCombiner can reinitialize if
    * needed.
    *
    * @param obj Object to visit.
    */
   virtual void visit(ossimObject* obj);

};

#endif


text:
namespace hana = boost::hana;

// Define a simple model of IntegralConstant
struct constant_tag { using value_type = int; };
template <int i>
struct constant {
    static constexpr int value = i;
    using hana_tag = constant_tag;
};

namespace boost { namespace hana {
    template <>
    struct IntegralConstant<constant_tag> {
        static constexpr bool value = true;
    };

    template <typename From>
    struct to_impl<constant_tag, From, when<IntegralConstant<From>::value>> {
        template <typename N>
        static constexpr auto apply(N const&)
        { return constant<N::value>{}; }
    };
}}

// Make sure we really satisfy IntegralConstant<>.
static_assert(hana::IntegralConstant<constant<0>>::value, "");
static_assert(hana::IntegralConstant<constant<1>>::value, "");
static_assert(hana::IntegralConstant<constant<2>>::value, "");

// Make sure we're also a model of Constant automatically.
static_assert(hana::Constant<constant<0>>::value, "");
static_assert(hana::Constant<constant<1>>::value, "");
static_assert(hana::Constant<constant<2>>::value, "");

// Make sure we have the hana::value<> function defined automatically.
static_assert(hana::value<constant<0>>() == 0, "");
static_assert(hana::value<constant<1>>() == 1, "");
static_assert(hana::value<constant<2>>() == 2, "");
static_assert(hana::value<constant<3>>() == 3, "");

int main() { }


text:
#ifndef CAPU_DELEGATE_TEST_H
#define CAPU_DELEGATE_TEST_H

#include "gmock/gmock.h"
#include "capu/util/Delegate.h"

namespace capu
{
    class DelegateTest : public testing::Test
    {
    public:
        DelegateTest();
    protected:
    };
}

#endif // CAPU_DELEGATE_TEST_H