repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
vais-ral/CCPi-ML
AstroMl/Tensorflow/AstroML_BookPlots/Quasars_NN.py
<filename>AstroMl/Tensorflow/AstroML_BookPlots/Quasars_NN.py # -*- coding: utf-8 -*- """ Created on Tue Aug 7 15:40:18 2018 @author: zyv57124 """ import numpy as np from matplotlib import pyplot as plt from astroML.utils import split_samples from sklearn.metrics import roc_curve from sklearn.naive_bayes import GaussianNB from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis as QDA from sklearn.linear_model import LogisticRegression from sklearn.neighbors import KNeighborsClassifier from sklearn.tree import DecisionTreeClassifier from astroML.classification import GMMBayes import keras import tensorflow as tf from keras.models import Sequential from keras.layers import Dense, Activation from astroML.utils import completeness_contamination #---------------------------------------------------------------------- # This function adjusts matplotlib settings for a uniform feel in the textbook. # Note that with usetex=True, fonts are rendered with LaTeX. This may # result in an error if LaTeX is not installed on your system. In that case, # you can set usetex to False. from astroML.plotting import setup_text_plots setup_text_plots(fontsize=8, usetex=False) def predictionMap(xlim,ylim): mesh = [] for x in np.arange(xlim[0],xlim[1],0.001): for y in np.arange(ylim[0],ylim[1],0.001): mesh.append([x,y,0,0]) return (np.array(mesh)) #------------------------------------------------------------ # Fetch data and split into training and test samples quasars = np.load('quasars.npy') stars = np.load('stars.npy') # Truncate data for speed quasars = quasars[::5] stars = stars[::5] # stack colors into matrix X Nqso = len(quasars) Nstars = len(stars) X = np.empty((Nqso + Nstars, 4), dtype=float) X[:Nqso, 0] = quasars['mag_u'] - quasars['mag_g'] X[:Nqso, 1] = quasars['mag_g'] - quasars['mag_r'] X[:Nqso, 2] = quasars['mag_r'] - quasars['mag_i'] X[:Nqso, 3] = quasars['mag_i'] - quasars['mag_z'] X[Nqso:, 0] = stars['upsf'] - stars['gpsf'] X[Nqso:, 1] = stars['gpsf'] - stars['rpsf'] X[Nqso:, 2] = stars['rpsf'] - stars['ipsf'] X[Nqso:, 3] = stars['ipsf'] - stars['zpsf'] y = np.zeros(Nqso + Nstars, dtype=int) y[:Nqso] = 1 # split into training and test sets (X_train, X_test), (y_train, y_test) = split_samples(X, y, [0.9, 0.1], random_state=0) print (quasars.shape) print (stars.shape) print(X_test.shape) #%% LR = 0.003 Epochs = 3 BatchSize = 400 Multip = 1 N_tot = y_train.shape[0] #Total assignments of 0 (Classification = true) N_st = np.sum(y_train == 0) #Total assignments of 1 (Classification = false) N_rr = N_tot - N_st N_plot = 5000 + N_rr #%% model = keras.Sequential() model.add(Dense(8, input_dim = 4, activation="tanh")) model.add(Dense(6, activation="tanh")) model.add(Dense(1, activation="sigmoid")) model.compile(optimizer=tf.train.AdamOptimizer(learning_rate=LR), loss='binary_crossentropy', metrics=['binary_accuracy', 'categorical_accuracy']) history = model.fit(X_train, y_train, batch_size=BatchSize,epochs=Epochs, verbose=2) predictions = np.around(model.predict(X_test).reshape(model.predict(X_test).shape[0],)) #completeness, contamination = completeness_contamination(predictions,(y_test)) scores = model.evaluate(X_test,y_test) print(scores,model.metrics_names) loss = scores[0] print("\n%s: %.2f%%" % (model.metrics_names[1], scores[1]*100)) #%% def predictionMap(xlim,ylim): mesh = [] for x in np.arange(xlim[0],xlim[1],0.001): for y in np.arange(ylim[0],ylim[1],0.001): mesh.append([x,y,0,0]) return (np.array(mesh)) def splitdata(X,y,ratio): length = X.shape[0] return X[:int(length*ratio)],X[:int(length*(1-ratio))],y[:int(length*ratio)],y[:int(length*(1-ratio))] comp = [] cont = [] colour = [] completeness, contamination = completeness_contamination(predictions,(y_test)) scores = model.evaluate(X_test,y_test) print(scores,model.metrics_names) loss = scores[0] print("\n%s: %.2f%%" % (model.metrics_names[1], scores[1]*100)) comp.append(completeness) cont.append(contamination) color.append(coll+1) print("completeness",completeness) print("contamination", contamination) loss_data = history.history['loss'] epoch_data = np.arange(0,len((loss_data))) im_loss = ax_loss.plot(epoch_data,np.log(loss_data),'-',label=str(coll+1)+" Colours") ax_loss.set_xlabel('Epoch') ax_loss.legend()
qermyt/miniputer
lib/miniputer/components/atomic/data_to_bits.rb
require_relative 'wire_splitter' class DataToBits < WireSplitter end
msurdeanu/my-alerts-app
src/main/java/org/myalerts/model/User.java
package org.myalerts.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import lombok.Getter; import lombok.Setter; /** * @author <NAME> * @since 1.0.0 */ @Entity @Table(name = "users") public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; @Getter @Setter private boolean enabled; @Getter @Setter private String username; @Getter @Setter private String password; @Getter @Setter private String email; @Getter @Setter private String role; }
ScalablyTyped/SlinkyTyped
t/titanium/src/main/scala/typingsSlinky/titanium/Titanium/GestureShakeEvent.scala
<gh_stars>10-100 package typingsSlinky.titanium.Titanium import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} /** * Fired when the device is shaken. */ @js.native trait GestureShakeEvent extends GestureBaseEvent { /** * Time interval since previous shake event. On iOS, this value is 0 for the first shake * event in a series. */ var timestamp: Double = js.native /** * Acceleration along the X axis, in Gs. */ var x: Double = js.native /** * Acceleration along the Y axis, in Gs. */ var y: Double = js.native /** * Acceleration along the Z axis, in Gs. */ var z: Double = js.native } object GestureShakeEvent { @scala.inline def apply(source: Gesture, timestamp: Double, x: Double, y: Double, z: Double): GestureShakeEvent = { val __obj = js.Dynamic.literal(source = source.asInstanceOf[js.Any], timestamp = timestamp.asInstanceOf[js.Any], x = x.asInstanceOf[js.Any], y = y.asInstanceOf[js.Any], z = z.asInstanceOf[js.Any]) __obj.asInstanceOf[GestureShakeEvent] } @scala.inline implicit class GestureShakeEventMutableBuilder[Self <: GestureShakeEvent] (val x: Self) extends AnyVal { @scala.inline def setTimestamp(value: Double): Self = StObject.set(x, "timestamp", value.asInstanceOf[js.Any]) @scala.inline def setX(value: Double): Self = StObject.set(x, "x", value.asInstanceOf[js.Any]) @scala.inline def setY(value: Double): Self = StObject.set(x, "y", value.asInstanceOf[js.Any]) @scala.inline def setZ(value: Double): Self = StObject.set(x, "z", value.asInstanceOf[js.Any]) } }
shaqk/dfuse-eosio
tokenmeta/tokenmeta.go
package tokenmeta import ( "encoding/json" "fmt" "github.com/dfuse-io/bstream" pbabicodec "github.com/dfuse-io/dfuse-eosio/pb/dfuse/eosio/abicodec/v1" pbcodec "github.com/dfuse-io/dfuse-eosio/pb/dfuse/eosio/codec/v1" pbtokenmeta "github.com/dfuse-io/dfuse-eosio/pb/dfuse/eosio/tokenmeta/v1" "github.com/dfuse-io/dfuse-eosio/tokenmeta/cache" "github.com/dfuse-io/shutter" "github.com/eoscanada/eos-go" "go.uber.org/zap" ) const AccountsTable eos.TableName = eos.TableName("accounts") const StatTable eos.TableName = eos.TableName("stat") const EOSStakeTable eos.TableName = eos.TableName("delband") type TokenMeta struct { *shutter.Shutter source bstream.Source cache cache.Cache abiCodecCli pbabicodec.DecoderClient abisCache map[string]*abiItem saveEveryNBlock uint32 } func (t *TokenMeta) decodeDBOpToRow(data []byte, tableName eos.TableName, contract eos.AccountName, blocknum uint32) (json.RawMessage, error) { abi, err := t.getABI(contract, blocknum) if err != nil { return nil, fmt.Errorf("cannot get ABI: %w", err) } return decodeTableRow(data, tableName, abi) } func NewTokenMeta(cache cache.Cache, abiCodecCli pbabicodec.DecoderClient, saveEveryNBlock uint32) *TokenMeta { return &TokenMeta{ Shutter: shutter.New(), cache: cache, abisCache: map[string]*abiItem{}, abiCodecCli: abiCodecCli, saveEveryNBlock: saveEveryNBlock, } } func (t *TokenMeta) ProcessBlock(block *bstream.Block, obj interface{}) error { // forkable setup will only yield irreversible blocks muts := &cache.MutationsBatch{} blk := block.ToNative().(*pbcodec.Block) if (blk.Number % 120) == 0 { zlog.Info("process blk 1/120", zap.String("block_id", block.ID()), zap.Uint64("blocker_number", block.Number)) } for _, trx := range blk.TransactionTraces() { zlogger := zlog.With(zap.Uint64("blk_id", block.Num()), zap.String("trx_id", trx.Id)) for _, dbop := range trx.DbOps { if !shouldProcessDbop(dbop) { continue } zlog.Debug("processing dbop", zap.String("contract", dbop.Code), zap.String("table", dbop.TableName), zap.String("scope", dbop.Scope), zap.String("primary_key", dbop.PrimaryKey)) isEOSStake := dbop.Code == "eosio" && dbop.TableName == string(EOSStakeTable) tokenContract := eos.AccountName(dbop.Code) if !t.cache.IsTokenContract(tokenContract) && !isEOSStake { continue } symbolCode, err := eos.NameToSymbolCode(eos.Name(dbop.PrimaryKey)) if err != nil { zlogger.Warn("unable to decode primary key to symbol", zap.String("contract", string(tokenContract)), zap.String("table", dbop.TableName), zap.String("scope", dbop.Scope), zap.String("primary_key", dbop.PrimaryKey), zap.Error(err)) continue } rowData := dbop.NewData if rowData == nil { zlog.Info("using db row old data") rowData = dbop.OldData } row, err := t.decodeDBOpToRow(rowData, eos.TableName(dbop.TableName), tokenContract, uint32(block.Number)) if err != nil { zlogger.Error("cannot decode table row", zap.String("contract", string(tokenContract)), zap.String("table_name", dbop.TableName), zap.String("transaction_id", trx.Id), zap.Error(err)) continue } switch dbop.TableName { case string(EOSStakeTable): if !isEOSStake { zlogger.Error("something terribly wrong happened: table eosio stake but not eosio stake", zap.String("token_contract", string(tokenContract)), zap.String("symbol", symbolCode.String())) continue } eosStakeEntry, err := getStakeEntryFromDBRow(tokenContract, dbop.Scope, row) if err != nil { zlogger.Error("cannot apply stake entry", zap.String("token_contract", string(tokenContract)), zap.String("symbol", symbolCode.String()), zap.Error(err)) continue } muts.SetStake(eosStakeEntry) case string(AccountsTable): eosToken := t.cache.TokenContract(tokenContract, symbolCode) if eosToken == nil { zlogger.Warn("unsupported token for contract", zap.String("token_contract", string(tokenContract)), zap.String("symbol", symbolCode.String())) continue } accountBalance, err := getAccountBalanceFromDBRow(tokenContract, TokenToEOSSymbol(eosToken), dbop.Scope, row) if err != nil { zlogger.Warn("could not create account balance from dbop row", zap.String("token_contract", string(tokenContract)), zap.String("symbol", symbolCode.String()), zap.String("scope", dbop.Scope), zap.String("dbop_row", string(row))) continue } if dbop.NewData == nil { // if the db operation has no new data so it removed it muts.RemoveBalance(accountBalance) } else { muts.SetBalance(accountBalance) } case string(StatTable): var symbol *eos.Symbol eosToken := t.cache.TokenContract(tokenContract, symbolCode) if eosToken == nil { zlogger.Debug("new token contract", zap.String("token_contract", string(tokenContract)), zap.String("symbol", symbolCode.String())) } else { symbol = TokenToEOSSymbol(eosToken) } token, err := getTokenFromDBRow(tokenContract, symbol, row) if err != nil { zlogger.Warn("could not create token from dbop row", zap.String("token_contract", string(tokenContract)), zap.String("symbol", symbolCode.String()), zap.String("scope", dbop.Scope), zap.String("dbop_row", string(row))) continue } muts.SetToken(token) } } } errs := t.cache.Apply(muts, blk) if len(errs) != 0 { // TODO eventually catch fatal errors and break or ... what can we do ? zlog.Warn("errors applying block", zap.String("block_id", block.ID()), zap.Errors("errors", errs)) } if t.saveEveryNBlock != 0 && blk.Number%t.saveEveryNBlock == 0 { // TODO Should this be done async? if so we would need to add locks t.cache.SaveToFile() } return nil } func (i *TokenMeta) Launch() error { zlog.Info("launching pipeline") go i.source.Run() <-i.source.Terminated() zlog.Info("source is done") zlog.Info("export cache") err := i.cache.SaveToFile() if err != nil { zlog.Error("error exporting cache on shutdown", zap.Error(err)) } if err := i.source.Err(); err != nil { zlog.Error("source shutdown with error", zap.Error(err)) return err } return nil } func shouldProcessDbop(dbop *pbcodec.DBOp) bool { if dbop.TableName == string(AccountsTable) || dbop.TableName == string(StatTable) { return true } return false } func shouldProcessAction(actionTrace *pbcodec.ActionTrace) bool { if actionTrace.Action.Name == "close" { return true } return false } func TokenToEOSSymbol(e *pbtokenmeta.Token) *eos.Symbol { return &eos.Symbol{ Precision: uint8(e.Precision), Symbol: e.Symbol, } }
NelsonGomesNeto/ProgramC
Online Judges/CodeForces/534BCoveredPath.cpp
#include <bits/stdc++.h> int main() { int v1, v2, t, d; scanf("%d %d %d %d", &v1, &v2, &t, &d); if (v1 > v2) { int aux = v1; v1 = v2; v2 = aux; } int dist = v1 + v2; t -= 2; while (t -- > 0) { if (v1 - (d * t) < v2) v1 += d; else v1 = v2 + (d * (t + 1)); //printf("%d\n", v1); dist += v1; } printf("%d\n", dist); return(0); }
temportalflux/MelodyBot
src/ui/library_player/playback/backend_list.py
<reponame>temportalflux/MelodyBot from src.ui.core import Table class BackendList(Table): def __init__(self, parent, logger): Table.__init__(self, parent, logger) self.backends = [] self.add_column('Backend') self.init_treeview() def get_item_list(self): return self.backends def create_column_values_for(self, item): return (item.display_name(),) def get_selected_backend_id(self): selected = self.get_selected_item() if selected is not None: return selected.id() return None def refresh_with(self, items): selected_backend_id = self.get_selected_backend_id() self.backends = items self.backends.sort(key=lambda x: x.sort_name()) self.refresh() if selected_backend_id is not None: if selected_backend_id in self.backend_id_to_row_id: self.treeview.selection_set(self.backend_id_to_row_id[selected_backend_id]) return self.dispatch_on_selected() def clear_item_iids(self): Table.clear_item_iids(self) self.backend_id_to_row_id = {} def set_item_iid(self, item, iid): Table.set_item_iid(self, item, iid) self.backend_id_to_row_id[item.id()] = iid def set_selected_backend(self, id): self.set_selected_item(self.backend_id_to_row_id[id])
topherCarpediem/shopping
dist/components/Token/validateToken.js
<reponame>topherCarpediem/shopping "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _jsonwebtoken = require("jsonwebtoken"); var _jsonwebtoken2 = _interopRequireDefault(_jsonwebtoken); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = token => { const secretKey = "5e3cdc509e6c91feb9cedd4669441864a9e65b60c057c3cb00c18a0c61eece8d0d2b74612003ca7b22bde779695bc97aed33b1949cea1235192e15d6d22511d6"; const bufferedSecretKey = new Buffer(secretKey, "base64"); const options = { algorithm: "HS256", audience: "https://bsushopping.com", issuer: "https://bsushopping.com" }; let result = { type: "", data: {} }; _jsonwebtoken2.default.verify(token, bufferedSecretKey, options, (err, decoded) => { if (err === null) { result.type = "authenticated"; result.data = _extends({}, decoded); } else { result.type = "unauthorized"; result.data = { message: err.message }; } }); //console.log(result) return result; };
Mirai-Team/MiraiVN
include/display/DialogueFrame.hpp
//////////////////////////////////////////////////////////// // // MiraiVN // Copyright (C) 2014-2015 <NAME> (<EMAIL>), <NAME> (<EMAIL>) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it freely, // subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; // you must not claim that you wrote the original software. // If you use this software in a product, an acknowledgment // in the product documentation would be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, // and must not be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // //////////////////////////////////////////////////////////// #ifndef DIALOGUEFRAME_HPP_INCLUDED #define DIALOGUEFRAME_HPP_INCLUDED #include <iostream> #include <string> #include <memory> #include <sstream> #include <SFML/Graphics.hpp> #include <MiraiProject/util/StringUtilities.hpp> #include <MiraiProject/util/WindowManager.hpp> #include "display/DialogueFrameStream.hpp" #include "display/DialogueSkin.hpp" /** * @file DialogueFrame.hpp * @brief This file define DialogueFrame class. */ namespace mvn { //forward declaration. class DialogueFrameStream; /** * @class DialogueFrame */ class DialogueFrame { friend class DialogueSkin; public: /** * @brief Constructor * @details Genere a dialogue frame with DialogueSkin parameter. * * @param skin : A DialogueSkin. */ DialogueFrame(mvn::DialogueSkin skin); /** * @brief Return the sprite (background of the frame) * @return A sf::Sprite which is the background frame. */ sf::Sprite getSprite(); /** * @brief Return the name. * @return A sf::Text. */ sf::Text getName(); /** * @brief Return the text * @return [description] */ sf::Text getText(); /** * @brief Change the dialogue * @details Set name_ string value to character.getName(), set name_ color to character.getColor() * and set text_ string value to text. * * @param character : A Character * @param text [description] */ void changeDialogue(Character character, std::string text); /** * @brief Call DialogueFrameStream constructor in order to call changeDialogue * @details Allow you to use << operator in order to changeDialogue. * @param character : A character, by default it's a character with empty name and sf::Color::White. * @return Return a stream. */ DialogueFrameStream operator()(Character character = Character("")); private: sf::Font font_; sf::Text text_; sf::Text name_; sf::Sprite sprite_; }; } #endif
rubyberlin/cfp-app
app/models/comment.rb
class Comment < ApplicationRecord belongs_to :proposal belongs_to :user validates :proposal, :user, presence: true validates :body, presence: true def public? type == "PublicComment" end end # == Schema Information # # Table name: comments # # id :integer not null, primary key # proposal_id :integer # user_id :integer # parent_id :integer # body :text # type :string # created_at :datetime # updated_at :datetime # # Indexes # # index_comments_on_proposal_id (proposal_id) # index_comments_on_user_id (user_id) #
entityc/ec-sb-tutorial-service
src/main/java/org/entityc/tutorial/util/MarkdownImporter.java
package org.entityc.tutorial.util; import org.entityc.tutorial.exception.ServiceException; import org.entityc.tutorial.model.Exercise; import org.entityc.tutorial.model.Module; import org.entityc.tutorial.model.Session; import org.entityc.tutorial.model.Step; import org.entityc.tutorial.service.ExerciseService; import org.entityc.tutorial.service.ModuleService; import org.entityc.tutorial.service.SessionService; import org.entityc.tutorial.service.StepService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Scanner; import java.util.UUID; import java.util.Vector; @Service public class MarkdownImporter { private final ModuleService moduleService; private final SessionService sessionService; private final ExerciseService exerciseService; private final StepService stepService; @Autowired public MarkdownImporter( ModuleService moduleService, SessionService sessionService, ExerciseService exerciseService, StepService stepService ) { this.moduleService = moduleService; this.sessionService = sessionService; this.exerciseService = exerciseService; this.stepService = stepService; } public static Vector<Object> ParseHeadingLine(String line, final String prefix, boolean expectingNumber, boolean expectingTitle) { Vector<Object> headingParts = new Vector<>(); int runningIndex = 0; if (prefix != null) { if (!line.startsWith(prefix)) { return null; } runningIndex = prefix.length() + 1; } if (expectingNumber) { int colonIndex; if (expectingTitle) { colonIndex = line.indexOf(":"); if (colonIndex == -1) { return null; } } else { colonIndex = line.length(); } String numberString = line.substring(runningIndex, colonIndex); Integer numberValue = null; try { numberValue = Integer.valueOf(numberString); } catch (NumberFormatException e) { return null; } if (numberValue == null) { return null; } headingParts.add(numberValue); runningIndex = colonIndex + 1; } if (expectingTitle) { String title = line.substring(runningIndex).trim(); headingParts.add(title); } return headingParts; } public static int GetLevelOfLine(String line) { int level = 0; for (int i = 0; i < line.length(); i++) { if (line.charAt(i) == '#') { level++; } else { break; } } return level; } public boolean validateModuleMarkdown(final UUID tutorialId, final String markdownText) throws ServiceException { return importModuleMarkdown(tutorialId, markdownText, true); } public boolean importModuleMarkdown(final UUID tutorialId, final String markdownText) throws ServiceException { return importModuleMarkdown(tutorialId, markdownText, false); } private boolean importModuleMarkdown(final UUID tutorialId, final String markdownText, final boolean validateOnly) throws ServiceException { MarkdownImportState importState = MarkdownImportState.ModuleHeading; Module currentModule = null; Session currentSession = null; Exercise currentExercise = null; Step currentStep = null; StringBuilder bodyBuilder = new StringBuilder(); Scanner scanner = new Scanner(markdownText); while (true) { String line = scanner.hasNextLine() ? scanner.nextLine() : null; int lineLevel = line != null ? MarkdownImporter.GetLevelOfLine(line) : -1; int repeat = 0; do { switch (importState) { case ModuleHeading: if (lineLevel == 1) { String lineMinusNotation = line.substring(lineLevel).trim(); Vector<Object> results = MarkdownImporter.ParseHeadingLine(lineMinusNotation, "Module", true, true); if (results == null) { return false; } if (!validateOnly) { String title = (String) results.elementAt(1); currentModule = new Module(); currentModule.setNumber((Integer) results.elementAt(0)); currentModule.setTitle(title); currentModule = moduleService.createModuleWithTutorial(tutorialId, currentModule); } importState = MarkdownImportState.ModuleOverviewBody; bodyBuilder = new StringBuilder(); } else { return false; // expecting to find this level } break; case ModuleOverviewBody: { boolean foundOutside = lineLevel == -1 || lineLevel == 1; if (!foundOutside && lineLevel == 2) { String lineMinusNotation = line.substring(lineLevel).trim(); if (lineMinusNotation.startsWith("Session")) { foundOutside = true; } } if (foundOutside) { if (!validateOnly) { String overview = bodyBuilder.toString(); currentModule.setOverview(overview); moduleService.updateModule(currentModule); } importState = stateForLevel(lineLevel); repeat = 1; } if (bodyBuilder.length() == 0 && (line == null || line.trim().isEmpty())) { continue; } bodyBuilder.append(line); bodyBuilder.append("\n"); } break; case SessionHeading: if (lineLevel == 2) { String lineMinusNotation = line.substring(lineLevel).trim(); Vector<Object> results = MarkdownImporter.ParseHeadingLine(lineMinusNotation, "Session", true, true); if (results == null) { return false; } if (!validateOnly) { String title = (String)results.elementAt(1); currentSession = new Session(); currentSession.setNumber((Integer) results.elementAt(0)); currentSession.setTitle(title); currentSession.setObjective(""); currentSession.setDiscussion(""); currentSession = sessionService.createSessionWithModule(currentModule.getId(), currentSession); } importState = MarkdownImportState.SessionObjectiveHeading; } else { return false; // expecting to find this level } break; case SessionObjectiveHeading: if (lineLevel == 0 && line.isEmpty()) { // just skip blank lines before we get to the heading } else if (lineLevel == 3) { String lineMinusNotation = line.substring(lineLevel).trim(); Vector<Object> results = MarkdownImporter.ParseHeadingLine(lineMinusNotation, "Objective", false, false); if (results == null) { return false; } importState = MarkdownImportState.SessionObjectiveBody; bodyBuilder = new StringBuilder(); } else { return false; // expecting to find this level } break; case SessionObjectiveBody: { boolean foundOutside = lineLevel == -1 || (lineLevel > 0 && lineLevel <= 2); if (!foundOutside && lineLevel == 3) { String lineMinusNotation = line.substring(lineLevel).trim(); if (lineMinusNotation.startsWith("Discussion")) { foundOutside = true; } } if (foundOutside) { if (!validateOnly) { String objective = (bodyBuilder.toString()); currentSession.setObjective(objective); sessionService.updateSession(currentSession); } importState = MarkdownImportState.SessionDiscussionHeading; bodyBuilder = new StringBuilder(); repeat = 1; } else { if (bodyBuilder.length() == 0 && line.trim().isEmpty()) { continue; } bodyBuilder.append(line); bodyBuilder.append("\n"); } } break; case SessionDiscussionHeading: if (lineLevel == 0 && line.isEmpty()) { // just skip blank lines before we get to the heading } else if (lineLevel == 3) { String lineMinusNotation = line.substring(lineLevel).trim(); Vector<Object> results = MarkdownImporter.ParseHeadingLine(lineMinusNotation, "Discussion", false, false); if (results == null) { return false; } importState = MarkdownImportState.SessionDiscussionBody; bodyBuilder = new StringBuilder(); } else { return false; // expecting to find this level } break; case SessionDiscussionBody: { boolean foundOutside = lineLevel == -1 || (lineLevel > 0 && lineLevel <= 2); if (!foundOutside && lineLevel == 3) { String lineMinusNotation = line.substring(lineLevel).trim(); if (lineMinusNotation.startsWith("Exercise")) { foundOutside = true; } } if (foundOutside) { if (!validateOnly) { String discussion = (bodyBuilder.toString()); currentSession.setDiscussion(discussion); sessionService.updateSession(currentSession); } importState = stateForLevel(lineLevel); bodyBuilder = new StringBuilder(); repeat = 1; } else { if (bodyBuilder.length() == 0 && line.trim().isEmpty()) { continue; } bodyBuilder.append(line); bodyBuilder.append("\n"); } } break; case ExerciseHeading: if (lineLevel == 0 && line.isEmpty()) { // just skip blank lines before we get to the heading } else if (lineLevel == 3) { String lineMinusNotation = line.substring(lineLevel).trim(); Vector<Object> results = MarkdownImporter.ParseHeadingLine(lineMinusNotation, "Exercise", false, false); if (results == null) { return false; } if (!validateOnly) { currentExercise = new Exercise(); currentExercise.setNumber(1); currentExercise = exerciseService.createExerciseWithSession(currentSession.getId(), currentExercise); } importState = MarkdownImportState.ExerciseSummaryBody; bodyBuilder = new StringBuilder(); } else { return false; // expecting to find this level } break; case ExerciseSummaryBody: { boolean foundOutside = lineLevel == -1 || (lineLevel > 0 && lineLevel <= 3); if (!foundOutside && lineLevel == 4) { String lineMinusNotation = line.substring(lineLevel).trim(); if (lineMinusNotation.startsWith("Step")) { foundOutside = true; } } if (foundOutside) { if (!validateOnly) { String overview = (bodyBuilder.toString()); currentExercise.setOverview(overview); exerciseService.updateExercise(currentExercise); } importState = stateForLevel(lineLevel); bodyBuilder = new StringBuilder(); repeat = 1; } else { if (bodyBuilder.length() == 0 && line.trim().isEmpty()) { continue; } bodyBuilder.append(line); bodyBuilder.append("\n"); } } break; case StepHeading: if (lineLevel == 4) { String lineMinusNotation = line.substring(lineLevel).trim(); Vector<Object> results = MarkdownImporter.ParseHeadingLine(lineMinusNotation, "Step", true, false); if (results == null) { return false; } if (!validateOnly) { currentStep = new Step(); currentStep.setNumber((Integer) results.elementAt(0)); currentStep.setInstructions(""); currentStep = stepService.createStepWithExercise(currentExercise.getId(), currentStep); } importState = MarkdownImportState.StepInstructionsBody; bodyBuilder = new StringBuilder(); } else { return false; // expecting to find this level } break; case StepInstructionsBody: { boolean foundOutside = lineLevel == -1 || (lineLevel > 0 && lineLevel <= 4); if (!foundOutside && lineLevel == 4) { String lineMinusNotation = line.substring(lineLevel).trim(); if (lineMinusNotation.startsWith("Step")) { foundOutside = true; } } if (foundOutside) { if (!validateOnly) { String instructions = (bodyBuilder.toString()); currentStep.setInstructions(instructions); stepService.updateStep(currentStep); } importState = stateForLevel(lineLevel); repeat = 1; bodyBuilder = new StringBuilder(); } else { if (bodyBuilder.length() == 0 && line.trim().isEmpty()) { continue; } bodyBuilder.append(line); bodyBuilder.append("\n"); } } break; } } while (lineLevel != -1 && repeat-- > 0); if (lineLevel == -1) { break; } } scanner.close(); return true; } private MarkdownImportState stateForLevel(int level) { MarkdownImportState importState = MarkdownImportState.ModuleHeading; switch (level) { case 1: importState = MarkdownImportState.ModuleHeading; break; case 2: importState = MarkdownImportState.SessionHeading; break; case 3: importState = MarkdownImportState.ExerciseHeading; break; case 4: importState = MarkdownImportState.StepHeading; break; } return importState; } private enum MarkdownImportState { ModuleHeading, ModuleOverviewBody, SessionHeading, SessionObjectiveHeading, SessionObjectiveBody, SessionDiscussionHeading, SessionDiscussionBody, ExerciseHeading, ExerciseSummaryBody, StepHeading, StepInstructionsBody, } }
andrasigneczi/TravelOptimiser
DataCollector/mozilla/xulrunner-sdk/include/nsLocalFileWin.h
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _nsLocalFileWIN_H_ #define _nsLocalFileWIN_H_ #include "nscore.h" #include "nsError.h" #include "nsString.h" #include "nsCRT.h" #include "nsIFile.h" #include "nsIFactory.h" #include "nsILocalFileWin.h" #include "nsIHashable.h" #include "nsIClassInfoImpl.h" #include "prio.h" #include "mozilla/Attributes.h" #include "windows.h" #include "shlobj.h" #include <sys/stat.h> class nsLocalFile final : public nsILocalFileWin , public nsIHashable { public: NS_DEFINE_STATIC_CID_ACCESSOR(NS_LOCAL_FILE_CID) nsLocalFile(); static nsresult nsLocalFileConstructor(nsISupports* aOuter, const nsIID& aIID, void** aInstancePtr); // nsISupports interface NS_DECL_THREADSAFE_ISUPPORTS // nsIFile interface NS_DECL_NSIFILE // nsILocalFile interface NS_DECL_NSILOCALFILE // nsILocalFileWin interface NS_DECL_NSILOCALFILEWIN // nsIHashable interface NS_DECL_NSIHASHABLE public: static void GlobalInit(); static void GlobalShutdown(); private: // CopyMove and CopySingleFile constants for |options| parameter: enum CopyFileOption { FollowSymlinks = 1u << 0, Move = 1u << 1, SkipNtfsAclReset = 1u << 2, Rename = 1u << 3 }; nsLocalFile(const nsLocalFile& aOther); ~nsLocalFile() { } bool mDirty; // cached information can only be used when this is false bool mResolveDirty; bool mFollowSymlinks; // should we follow symlinks when working on this file // this string will always be in native format! nsString mWorkingPath; // this will be the resolved path of shortcuts, it will *NEVER* // be returned to the user nsString mResolvedPath; // this string, if not empty, is the *short* pathname that represents // mWorkingPath nsString mShortWorkingPath; PRFileInfo64 mFileInfo64; void MakeDirty() { mDirty = true; mResolveDirty = true; mShortWorkingPath.Truncate(); } nsresult ResolveAndStat(); nsresult Resolve(); nsresult ResolveShortcut(); void EnsureShortPath(); nsresult CopyMove(nsIFile* aNewParentDir, const nsAString& aNewName, uint32_t aOptions); nsresult CopySingleFile(nsIFile* aSource, nsIFile* aDest, const nsAString& aNewName, uint32_t aOptions); nsresult SetModDate(int64_t aLastModifiedTime, const wchar_t* aFilePath); nsresult HasFileAttribute(DWORD aFileAttrib, bool* aResult); nsresult AppendInternal(const nsAFlatString& aNode, bool aMultipleComponents); nsresult OpenNSPRFileDescMaybeShareDelete(int32_t aFlags, int32_t aMode, bool aShareDelete, PRFileDesc** aResult); }; #endif
jan-moeller/text
test/tailoring_rule_test_zh_stroke_014.cpp
// Warning! This file is autogenerated. #include <boost/text/collation_table.hpp> #include <boost/text/collate.hpp> #include <boost/text/data/all.hpp> #ifndef LIMIT_TESTING_FOR_CI #include <boost/text/save_load_table.hpp> #include <boost/filesystem.hpp> #endif #include <gtest/gtest.h> using namespace boost::text; auto const error = [](string const & s) { std::cout << s; }; auto const warning = [](string const & s) {}; collation_table make_save_load_table() { #ifdef LIMIT_TESTING_FOR_CI string const table_str(data::zh::stroke_collation_tailoring()); return tailored_collation_table( table_str, "zh::stroke_collation_tailoring()", error, warning); #else if (!exists(boost::filesystem::path("zh_stroke.table"))) { string const table_str(data::zh::stroke_collation_tailoring()); collation_table table = tailored_collation_table( table_str, "zh::stroke_collation_tailoring()", error, warning); save_table(table, "zh_stroke.table.14"); boost::filesystem::rename("zh_stroke.table.14", "zh_stroke.table"); } return load_table("zh_stroke.table"); #endif } collation_table const & table() { static collation_table retval = make_save_load_table(); return retval; } TEST(tailoring, zh_stroke_013_000) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f46); auto const rel = std::vector<uint32_t>(1, 0x6f47); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f47); auto const rel = std::vector<uint32_t>(1, 0x6f48); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f48); auto const rel = std::vector<uint32_t>(1, 0x6f49); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f49); auto const rel = std::vector<uint32_t>(1, 0x6f4a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f4a); auto const rel = std::vector<uint32_t>(1, 0x6f4b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f4b); auto const rel = std::vector<uint32_t>(1, 0x6f4c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f4c); auto const rel = std::vector<uint32_t>(1, 0x6f4d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f4d); auto const rel = std::vector<uint32_t>(1, 0x3d3d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x3d3d); auto const rel = std::vector<uint32_t>(1, 0x3d46); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x3d46); auto const rel = std::vector<uint32_t>(1, 0x23ed7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23ed7); auto const rel = std::vector<uint32_t>(1, 0x23ef7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23ef7); auto const rel = std::vector<uint32_t>(1, 0x23ef8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23ef8); auto const rel = std::vector<uint32_t>(1, 0x23ef9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23ef9); auto const rel = std::vector<uint32_t>(1, 0x23efa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23efa); auto const rel = std::vector<uint32_t>(1, 0x23efb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23efb); auto const rel = std::vector<uint32_t>(1, 0x23efc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23efc); auto const rel = std::vector<uint32_t>(1, 0x23f35); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23f35); auto const rel = std::vector<uint32_t>(1, 0x23f41); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x23f41); auto const rel = std::vector<uint32_t>(1, 0x6f4e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f4e); auto const rel = std::vector<uint32_t>(1, 0x6f73); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x6f73); auto const rel = std::vector<uint32_t>(1, 0x7155); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7155); auto const rel = std::vector<uint32_t>(1, 0x715b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x715b); auto const rel = std::vector<uint32_t>(1, 0x7179); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7179); auto const rel = std::vector<uint32_t>(1, 0x717b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x717b); auto const rel = std::vector<uint32_t>(1, 0x717c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x717c); auto const rel = std::vector<uint32_t>(1, 0x717d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x717d); auto const rel = std::vector<uint32_t>(1, 0x717e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x717e); auto const rel = std::vector<uint32_t>(1, 0x717f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x717f); auto const rel = std::vector<uint32_t>(1, 0x7180); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7180); auto const rel = std::vector<uint32_t>(1, 0x7181); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7181); auto const rel = std::vector<uint32_t>(1, 0x7182); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7182); auto const rel = std::vector<uint32_t>(1, 0x7183); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7183); auto const rel = std::vector<uint32_t>(1, 0x7184); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7184); auto const rel = std::vector<uint32_t>(1, 0x7185); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7185); auto const rel = std::vector<uint32_t>(1, 0x7186); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7186); auto const rel = std::vector<uint32_t>(1, 0x7187); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7187); auto const rel = std::vector<uint32_t>(1, 0x7188); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7188); auto const rel = std::vector<uint32_t>(1, 0x7189); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7189); auto const rel = std::vector<uint32_t>(1, 0x718a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x718a); auto const rel = std::vector<uint32_t>(1, 0x718b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x718b); auto const rel = std::vector<uint32_t>(1, 0x718c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x718c); auto const rel = std::vector<uint32_t>(1, 0x718d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x718d); auto const rel = std::vector<uint32_t>(1, 0x718e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x718e); auto const rel = std::vector<uint32_t>(1, 0x718f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x718f); auto const rel = std::vector<uint32_t>(1, 0x7190); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7190); auto const rel = std::vector<uint32_t>(1, 0x7191); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7191); auto const rel = std::vector<uint32_t>(1, 0x7192); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7192); auto const rel = std::vector<uint32_t>(1, 0x7193); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7193); auto const rel = std::vector<uint32_t>(1, 0x7194); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7194); auto const rel = std::vector<uint32_t>(1, 0x7195); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7195); auto const rel = std::vector<uint32_t>(1, 0x7196); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_001) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7196); auto const rel = std::vector<uint32_t>(1, 0x7197); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7197); auto const rel = std::vector<uint32_t>(1, 0x7198); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7198); auto const rel = std::vector<uint32_t>(1, 0x7199); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7199); auto const rel = std::vector<uint32_t>(1, 0x84b8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b8); auto const rel = std::vector<uint32_t>(1, 0x3de7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x3de7); auto const rel = std::vector<uint32_t>(1, 0x3de8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x3de8); auto const rel = std::vector<uint32_t>(1, 0x2430d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x2430d); auto const rel = std::vector<uint32_t>(1, 0x2431a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x2431a); auto const rel = std::vector<uint32_t>(1, 0x24334); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x24334); auto const rel = std::vector<uint32_t>(1, 0x24348); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x24348); auto const rel = std::vector<uint32_t>(1, 0x7233); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7233); auto const rel = std::vector<uint32_t>(1, 0x723e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x723e); auto const rel = std::vector<uint32_t>(1, 0x7244); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7244); auto const rel = std::vector<uint32_t>(1, 0x7253); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7253); auto const rel = std::vector<uint32_t>(1, 0x7254); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7254); auto const rel = std::vector<uint32_t>(1, 0x3e22); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x3e22); auto const rel = std::vector<uint32_t>(1, 0x7292); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7292); auto const rel = std::vector<uint32_t>(1, 0x7293); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7293); auto const rel = std::vector<uint32_t>(1, 0x7294); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7294); auto const rel = std::vector<uint32_t>(1, 0x7295); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7295); auto const rel = std::vector<uint32_t>(1, 0x7296); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7296); auto const rel = std::vector<uint32_t>(1, 0x7297); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7297); auto const rel = std::vector<uint32_t>(1, 0x7343); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7343); auto const rel = std::vector<uint32_t>(1, 0x7344); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7344); auto const rel = std::vector<uint32_t>(1, 0x734c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x734c); auto const rel = std::vector<uint32_t>(1, 0x734d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x734d); auto const rel = std::vector<uint32_t>(1, 0x734f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x734f); auto const rel = std::vector<uint32_t>(1, 0x7350); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7350); auto const rel = std::vector<uint32_t>(1, 0x7351); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7351); auto const rel = std::vector<uint32_t>(1, 0x7352); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7352); auto const rel = std::vector<uint32_t>(1, 0x7353); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7353); auto const rel = std::vector<uint32_t>(1, 0x7354); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7354); auto const rel = std::vector<uint32_t>(1, 0x7355); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7355); auto const rel = std::vector<uint32_t>(1, 0x7460); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7460); auto const rel = std::vector<uint32_t>(1, 0x7461); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7461); auto const rel = std::vector<uint32_t>(1, 0x7462); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7462); auto const rel = std::vector<uint32_t>(1, 0x7463); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7463); auto const rel = std::vector<uint32_t>(1, 0x7464); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7464); auto const rel = std::vector<uint32_t>(1, 0x7465); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7465); auto const rel = std::vector<uint32_t>(1, 0x7466); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7466); auto const rel = std::vector<uint32_t>(1, 0x7467); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7467); auto const rel = std::vector<uint32_t>(1, 0x7468); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7468); auto const rel = std::vector<uint32_t>(1, 0x746a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x746a); auto const rel = std::vector<uint32_t>(1, 0x746b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x746b); auto const rel = std::vector<uint32_t>(1, 0x746d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x746d); auto const rel = std::vector<uint32_t>(1, 0x746e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x746e); auto const rel = std::vector<uint32_t>(1, 0x7470); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7470); auto const rel = std::vector<uint32_t>(1, 0x7471); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7471); auto const rel = std::vector<uint32_t>(1, 0x7472); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7472); auto const rel = std::vector<uint32_t>(1, 0x7473); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7473); auto const rel = std::vector<uint32_t>(1, 0x7474); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_002) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7474); auto const rel = std::vector<uint32_t>(1, 0x7475); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7475); auto const rel = std::vector<uint32_t>(1, 0x7476); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7476); auto const rel = std::vector<uint32_t>(1, 0x7477); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7477); auto const rel = std::vector<uint32_t>(1, 0x7478); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7478); auto const rel = std::vector<uint32_t>(1, 0x3ee7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x3ee7); auto const rel = std::vector<uint32_t>(1, 0x3ee9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x3ee9); auto const rel = std::vector<uint32_t>(1, 0x249ec); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x249ec); auto const rel = std::vector<uint32_t>(1, 0x249ed); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x249ed); auto const rel = std::vector<uint32_t>(1, 0x249f6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x249f6); auto const rel = std::vector<uint32_t>(1, 0x249f7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x249f7); auto const rel = std::vector<uint32_t>(1, 0x249f8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x249f8); auto const rel = std::vector<uint32_t>(1, 0x249f9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x249f9); auto const rel = std::vector<uint32_t>(1, 0x249fb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x249fb); auto const rel = std::vector<uint32_t>(1, 0x24a0e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x24a0e); auto const rel = std::vector<uint32_t>(1, 0x24a12); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x24a12); auto const rel = std::vector<uint32_t>(1, 0x24a13); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x24a13); auto const rel = std::vector<uint32_t>(1, 0x7500); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7500); auto const rel = std::vector<uint32_t>(1, 0x7502); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7502); auto const rel = std::vector<uint32_t>(1, 0x7503); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7503); auto const rel = std::vector<uint32_t>(1, 0x7504); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7504); auto const rel = std::vector<uint32_t>(1, 0x7505); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7505); auto const rel = std::vector<uint32_t>(1, 0x7506); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7506); auto const rel = std::vector<uint32_t>(1, 0x24b6e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x24b6e); auto const rel = std::vector<uint32_t>(1, 0x7527); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7527); auto const rel = std::vector<uint32_t>(1, 0x757b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x757b); auto const rel = std::vector<uint32_t>(1, 0x757c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x757c); auto const rel = std::vector<uint32_t>(1, 0x757d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x757d); auto const rel = std::vector<uint32_t>(1, 0x7590); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7590); auto const rel = std::vector<uint32_t>(1, 0x7591); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7591); auto const rel = std::vector<uint32_t>(1, 0x7607); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7607); auto const rel = std::vector<uint32_t>(1, 0x7608); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7608); auto const rel = std::vector<uint32_t>(1, 0x7609); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7609); auto const rel = std::vector<uint32_t>(1, 0x760a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x760a); auto const rel = std::vector<uint32_t>(1, 0x760b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x760b); auto const rel = std::vector<uint32_t>(1, 0x760c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x760c); auto const rel = std::vector<uint32_t>(1, 0x760d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x760d); auto const rel = std::vector<uint32_t>(1, 0x760e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x760e); auto const rel = std::vector<uint32_t>(1, 0x7611); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7611); auto const rel = std::vector<uint32_t>(1, 0x7612); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7612); auto const rel = std::vector<uint32_t>(1, 0x7613); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7613); auto const rel = std::vector<uint32_t>(1, 0x7614); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7614); auto const rel = std::vector<uint32_t>(1, 0x7615); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7615); auto const rel = std::vector<uint32_t>(1, 0x7616); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7616); auto const rel = std::vector<uint32_t>(1, 0x7617); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7617); auto const rel = std::vector<uint32_t>(1, 0x7618); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7618); auto const rel = std::vector<uint32_t>(1, 0x7627); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7627); auto const rel = std::vector<uint32_t>(1, 0x76b6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x76b6); auto const rel = std::vector<uint32_t>(1, 0x76b7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x76b7); auto const rel = std::vector<uint32_t>(1, 0x76b8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x76b8); auto const rel = std::vector<uint32_t>(1, 0x76b9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x76b9); auto const rel = std::vector<uint32_t>(1, 0x76e0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_003) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x76e0); auto const rel = std::vector<uint32_t>(1, 0x76e1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x76e1); auto const rel = std::vector<uint32_t>(1, 0x76e2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x76e2); auto const rel = std::vector<uint32_t>(1, 0x76e3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x76e3); auto const rel = std::vector<uint32_t>(1, 0x776e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x776e); auto const rel = std::vector<uint32_t>(1, 0x776f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x776f); auto const rel = std::vector<uint32_t>(1, 0x7770); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7770); auto const rel = std::vector<uint32_t>(1, 0x7771); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7771); auto const rel = std::vector<uint32_t>(1, 0x7772); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7772); auto const rel = std::vector<uint32_t>(1, 0x7773); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7773); auto const rel = std::vector<uint32_t>(1, 0x7774); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7774); auto const rel = std::vector<uint32_t>(1, 0x7775); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7775); auto const rel = std::vector<uint32_t>(1, 0x7776); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7776); auto const rel = std::vector<uint32_t>(1, 0x7777); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7777); auto const rel = std::vector<uint32_t>(1, 0x7778); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7778); auto const rel = std::vector<uint32_t>(1, 0x777a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x777a); auto const rel = std::vector<uint32_t>(1, 0x777b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x777b); auto const rel = std::vector<uint32_t>(1, 0x777c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x777c); auto const rel = std::vector<uint32_t>(1, 0x777d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x777d); auto const rel = std::vector<uint32_t>(1, 0x777e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x777e); auto const rel = std::vector<uint32_t>(1, 0x777f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x777f); auto const rel = std::vector<uint32_t>(1, 0x7780); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7780); auto const rel = std::vector<uint32_t>(1, 0x7781); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7781); auto const rel = std::vector<uint32_t>(1, 0x7782); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7782); auto const rel = std::vector<uint32_t>(1, 0x7783); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7783); auto const rel = std::vector<uint32_t>(1, 0x7784); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7784); auto const rel = std::vector<uint32_t>(1, 0x7785); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7785); auto const rel = std::vector<uint32_t>(1, 0x7786); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7786); auto const rel = std::vector<uint32_t>(1, 0x4053); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4053); auto const rel = std::vector<uint32_t>(1, 0x25220); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x25220); auto const rel = std::vector<uint32_t>(1, 0x25221); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x25221); auto const rel = std::vector<uint32_t>(1, 0x787e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x787e); auto const rel = std::vector<uint32_t>(1, 0x789d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x789d); auto const rel = std::vector<uint32_t>(1, 0x789e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x789e); auto const rel = std::vector<uint32_t>(1, 0x789f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x789f); auto const rel = std::vector<uint32_t>(1, 0x78a0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a0); auto const rel = std::vector<uint32_t>(1, 0x78a1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a1); auto const rel = std::vector<uint32_t>(1, 0x78a2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a2); auto const rel = std::vector<uint32_t>(1, 0x78a3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a3); auto const rel = std::vector<uint32_t>(1, 0x78a4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a4); auto const rel = std::vector<uint32_t>(1, 0x78a5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a5); auto const rel = std::vector<uint32_t>(1, 0x78a6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a6); auto const rel = std::vector<uint32_t>(1, 0x78a7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a7); auto const rel = std::vector<uint32_t>(1, 0x78a8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a8); auto const rel = std::vector<uint32_t>(1, 0x78a9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78a9); auto const rel = std::vector<uint32_t>(1, 0x78aa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78aa); auto const rel = std::vector<uint32_t>(1, 0x78ab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78ab); auto const rel = std::vector<uint32_t>(1, 0x78ac); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78ac); auto const rel = std::vector<uint32_t>(1, 0x78ad); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78ad); auto const rel = std::vector<uint32_t>(1, 0x78ae); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78ae); auto const rel = std::vector<uint32_t>(1, 0x78af); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78af); auto const rel = std::vector<uint32_t>(1, 0x78b1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_004) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b1); auto const rel = std::vector<uint32_t>(1, 0x78b2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b2); auto const rel = std::vector<uint32_t>(1, 0x78b3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b3); auto const rel = std::vector<uint32_t>(1, 0x78b4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b4); auto const rel = std::vector<uint32_t>(1, 0x78b5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b5); auto const rel = std::vector<uint32_t>(1, 0x78b6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b6); auto const rel = std::vector<uint32_t>(1, 0x78b7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b7); auto const rel = std::vector<uint32_t>(1, 0x78b8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b8); auto const rel = std::vector<uint32_t>(1, 0x78b9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78b9); auto const rel = std::vector<uint32_t>(1, 0x78c1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x78c1); auto const rel = std::vector<uint32_t>(1, 0x40c8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x40c8); auto const rel = std::vector<uint32_t>(1, 0x7987); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7987); auto const rel = std::vector<uint32_t>(1, 0x7988); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7988); auto const rel = std::vector<uint32_t>(1, 0x7989); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7989); auto const rel = std::vector<uint32_t>(1, 0x798a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x798a); auto const rel = std::vector<uint32_t>(1, 0x798b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x798b); auto const rel = std::vector<uint32_t>(1, 0x798c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x798c); auto const rel = std::vector<uint32_t>(1, 0x798d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x798d); auto const rel = std::vector<uint32_t>(1, 0x798e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x798e); auto const rel = std::vector<uint32_t>(1, 0x798f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x798f); auto const rel = std::vector<uint32_t>(1, 0x7990); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7990); auto const rel = std::vector<uint32_t>(1, 0x7991); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7991); auto const rel = std::vector<uint32_t>(1, 0x7992); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7992); auto const rel = std::vector<uint32_t>(1, 0x7993); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7993); auto const rel = std::vector<uint32_t>(1, 0x7994); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7994); auto const rel = std::vector<uint32_t>(1, 0x7995); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7995); auto const rel = std::vector<uint32_t>(1, 0x7996); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7996); auto const rel = std::vector<uint32_t>(1, 0x7997); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7997); auto const rel = std::vector<uint32_t>(1, 0x7998); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7998); auto const rel = std::vector<uint32_t>(1, 0x7999); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7999); auto const rel = std::vector<uint32_t>(1, 0x7a26); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a26); auto const rel = std::vector<uint32_t>(1, 0x7a27); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a27); auto const rel = std::vector<uint32_t>(1, 0x7a28); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a28); auto const rel = std::vector<uint32_t>(1, 0x7a29); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a29); auto const rel = std::vector<uint32_t>(1, 0x7a2a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a2a); auto const rel = std::vector<uint32_t>(1, 0x7a2b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a2b); auto const rel = std::vector<uint32_t>(1, 0x7a2c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a2c); auto const rel = std::vector<uint32_t>(1, 0x7a2d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a2d); auto const rel = std::vector<uint32_t>(1, 0x7a2e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a2e); auto const rel = std::vector<uint32_t>(1, 0x7a2f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a2f); auto const rel = std::vector<uint32_t>(1, 0x7a30); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a30); auto const rel = std::vector<uint32_t>(1, 0x7a31); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a31); auto const rel = std::vector<uint32_t>(1, 0x7a32); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a32); auto const rel = std::vector<uint32_t>(1, 0x7a33); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a33); auto const rel = std::vector<uint32_t>(1, 0x7a4a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a4a); auto const rel = std::vector<uint32_t>(1, 0x4167); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4167); auto const rel = std::vector<uint32_t>(1, 0x7a35); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7a35); auto const rel = std::vector<uint32_t>(1, 0x7aa8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aa8); auto const rel = std::vector<uint32_t>(1, 0x7aa9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aa9); auto const rel = std::vector<uint32_t>(1, 0x7aaa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aaa); auto const rel = std::vector<uint32_t>(1, 0x7aab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aab); auto const rel = std::vector<uint32_t>(1, 0x7aac); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_005) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aac); auto const rel = std::vector<uint32_t>(1, 0x7aad); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aad); auto const rel = std::vector<uint32_t>(1, 0x259cc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x259cc); auto const rel = std::vector<uint32_t>(1, 0x7aec); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aec); auto const rel = std::vector<uint32_t>(1, 0x7aed); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aed); auto const rel = std::vector<uint32_t>(1, 0x7aef); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aef); auto const rel = std::vector<uint32_t>(1, 0x7af0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7af0); auto const rel = std::vector<uint32_t>(1, 0x25a9c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x25a9c); auto const rel = std::vector<uint32_t>(1, 0x7aee); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7aee); auto const rel = std::vector<uint32_t>(1, 0x7b75); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b75); auto const rel = std::vector<uint32_t>(1, 0x7b81); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b81); auto const rel = std::vector<uint32_t>(1, 0x7b82); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b82); auto const rel = std::vector<uint32_t>(1, 0x7b83); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b83); auto const rel = std::vector<uint32_t>(1, 0x7b84); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b84); auto const rel = std::vector<uint32_t>(1, 0x7b85); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b85); auto const rel = std::vector<uint32_t>(1, 0x7b86); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b86); auto const rel = std::vector<uint32_t>(1, 0x7b87); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b87); auto const rel = std::vector<uint32_t>(1, 0x7b88); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b88); auto const rel = std::vector<uint32_t>(1, 0x7b89); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b89); auto const rel = std::vector<uint32_t>(1, 0x7b8a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b8a); auto const rel = std::vector<uint32_t>(1, 0x7b8b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b8b); auto const rel = std::vector<uint32_t>(1, 0x7b8c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b8c); auto const rel = std::vector<uint32_t>(1, 0x7b8d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b8d); auto const rel = std::vector<uint32_t>(1, 0x7b8e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b8e); auto const rel = std::vector<uint32_t>(1, 0x7b8f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b8f); auto const rel = std::vector<uint32_t>(1, 0x7b90); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b90); auto const rel = std::vector<uint32_t>(1, 0x7b91); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b91); auto const rel = std::vector<uint32_t>(1, 0x7b92); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b92); auto const rel = std::vector<uint32_t>(1, 0x7b93); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b93); auto const rel = std::vector<uint32_t>(1, 0x7b94); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b94); auto const rel = std::vector<uint32_t>(1, 0x7b95); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b95); auto const rel = std::vector<uint32_t>(1, 0x7b96); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b96); auto const rel = std::vector<uint32_t>(1, 0x7b97); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b97); auto const rel = std::vector<uint32_t>(1, 0x7b98); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b98); auto const rel = std::vector<uint32_t>(1, 0x7b99); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b99); auto const rel = std::vector<uint32_t>(1, 0x7b9a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b9a); auto const rel = std::vector<uint32_t>(1, 0x7b9b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b9b); auto const rel = std::vector<uint32_t>(1, 0x7b9c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b9c); auto const rel = std::vector<uint32_t>(1, 0x7b9d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b9d); auto const rel = std::vector<uint32_t>(1, 0x7b9e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b9e); auto const rel = std::vector<uint32_t>(1, 0x7b9f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7b9f); auto const rel = std::vector<uint32_t>(1, 0x7ba0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba0); auto const rel = std::vector<uint32_t>(1, 0x7ba1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba1); auto const rel = std::vector<uint32_t>(1, 0x7ba2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba2); auto const rel = std::vector<uint32_t>(1, 0x7ba3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba3); auto const rel = std::vector<uint32_t>(1, 0x7ba4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba4); auto const rel = std::vector<uint32_t>(1, 0x7ba5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba5); auto const rel = std::vector<uint32_t>(1, 0x7ba6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba6); auto const rel = std::vector<uint32_t>(1, 0x7ba7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba7); auto const rel = std::vector<uint32_t>(1, 0x7ba8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba8); auto const rel = std::vector<uint32_t>(1, 0x7ba9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7ba9); auto const rel = std::vector<uint32_t>(1, 0x7baa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_006) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7baa); auto const rel = std::vector<uint32_t>(1, 0x7bab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7bab); auto const rel = std::vector<uint32_t>(1, 0x4201); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4201); auto const rel = std::vector<uint32_t>(1, 0x4202); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4202); auto const rel = std::vector<uint32_t>(1, 0x4203); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4203); auto const rel = std::vector<uint32_t>(1, 0x4204); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4204); auto const rel = std::vector<uint32_t>(1, 0x4205); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4205); auto const rel = std::vector<uint32_t>(1, 0x4206); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4206); auto const rel = std::vector<uint32_t>(1, 0x4207); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4207); auto const rel = std::vector<uint32_t>(1, 0x4208); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4208); auto const rel = std::vector<uint32_t>(1, 0x4209); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4209); auto const rel = std::vector<uint32_t>(1, 0x420a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x420a); auto const rel = std::vector<uint32_t>(1, 0x420b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x420b); auto const rel = std::vector<uint32_t>(1, 0x420c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x420c); auto const rel = std::vector<uint32_t>(1, 0x420d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x420d); auto const rel = std::vector<uint32_t>(1, 0x25bb3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x25bb3); auto const rel = std::vector<uint32_t>(1, 0x25bb4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x25bb4); auto const rel = std::vector<uint32_t>(1, 0x25bc6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x25bc6); auto const rel = std::vector<uint32_t>(1, 0x7bb8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7bb8); auto const rel = std::vector<uint32_t>(1, 0x7cb6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cb6); auto const rel = std::vector<uint32_t>(1, 0x7cb7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cb7); auto const rel = std::vector<uint32_t>(1, 0x7cb8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cb8); auto const rel = std::vector<uint32_t>(1, 0x7cb9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cb9); auto const rel = std::vector<uint32_t>(1, 0x7cba); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cba); auto const rel = std::vector<uint32_t>(1, 0x7cbb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cbb); auto const rel = std::vector<uint32_t>(1, 0x7cbc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cbc); auto const rel = std::vector<uint32_t>(1, 0x7cbd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cbd); auto const rel = std::vector<uint32_t>(1, 0x7cbe); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cbe); auto const rel = std::vector<uint32_t>(1, 0x7cbf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cbf); auto const rel = std::vector<uint32_t>(1, 0x7cc1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7cc1); auto const rel = std::vector<uint32_t>(1, 0x25ea6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x25ea6); auto const rel = std::vector<uint32_t>(1, 0x25ebc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x25ebc); auto const rel = std::vector<uint32_t>(1, 0x7d96); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7d96); auto const rel = std::vector<uint32_t>(1, 0x7dd0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dd0); auto const rel = std::vector<uint32_t>(1, 0x7d9c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7d9c); auto const rel = std::vector<uint32_t>(1, 0x7d9d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7d9d); auto const rel = std::vector<uint32_t>(1, 0x7d9e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7d9e); auto const rel = std::vector<uint32_t>(1, 0x7d9f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7d9f); auto const rel = std::vector<uint32_t>(1, 0x7da0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da0); auto const rel = std::vector<uint32_t>(1, 0x7da1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da1); auto const rel = std::vector<uint32_t>(1, 0x7da2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da2); auto const rel = std::vector<uint32_t>(1, 0x7da3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da3); auto const rel = std::vector<uint32_t>(1, 0x7da4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da4); auto const rel = std::vector<uint32_t>(1, 0x7da5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da5); auto const rel = std::vector<uint32_t>(1, 0x7da6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da6); auto const rel = std::vector<uint32_t>(1, 0x7da7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da7); auto const rel = std::vector<uint32_t>(1, 0x7da8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da8); auto const rel = std::vector<uint32_t>(1, 0x7da9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7da9); auto const rel = std::vector<uint32_t>(1, 0x7daa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7daa); auto const rel = std::vector<uint32_t>(1, 0x7dab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dab); auto const rel = std::vector<uint32_t>(1, 0x7dac); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dac); auto const rel = std::vector<uint32_t>(1, 0x7dad); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_007) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dad); auto const rel = std::vector<uint32_t>(1, 0x7dae); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dae); auto const rel = std::vector<uint32_t>(1, 0x7daf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7daf); auto const rel = std::vector<uint32_t>(1, 0x7db0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db0); auto const rel = std::vector<uint32_t>(1, 0x7db1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db1); auto const rel = std::vector<uint32_t>(1, 0x7db2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db2); auto const rel = std::vector<uint32_t>(1, 0x7db3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db3); auto const rel = std::vector<uint32_t>(1, 0x7db4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db4); auto const rel = std::vector<uint32_t>(1, 0x7db5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db5); auto const rel = std::vector<uint32_t>(1, 0x7db6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db6); auto const rel = std::vector<uint32_t>(1, 0x7db7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db7); auto const rel = std::vector<uint32_t>(1, 0x7db8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db8); auto const rel = std::vector<uint32_t>(1, 0x7db9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7db9); auto const rel = std::vector<uint32_t>(1, 0x7dba); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dba); auto const rel = std::vector<uint32_t>(1, 0x7dbb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dbb); auto const rel = std::vector<uint32_t>(1, 0x7dbc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dbc); auto const rel = std::vector<uint32_t>(1, 0x7dbd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dbd); auto const rel = std::vector<uint32_t>(1, 0x7dbe); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dbe); auto const rel = std::vector<uint32_t>(1, 0x7dbf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dbf); auto const rel = std::vector<uint32_t>(1, 0x7dc0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc0); auto const rel = std::vector<uint32_t>(1, 0x7dc1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc1); auto const rel = std::vector<uint32_t>(1, 0x7dc2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc2); auto const rel = std::vector<uint32_t>(1, 0x7dc3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc3); auto const rel = std::vector<uint32_t>(1, 0x7dc4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc4); auto const rel = std::vector<uint32_t>(1, 0x7dc5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc5); auto const rel = std::vector<uint32_t>(1, 0x7dc6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc6); auto const rel = std::vector<uint32_t>(1, 0x7dc7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc7); auto const rel = std::vector<uint32_t>(1, 0x7dc8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc8); auto const rel = std::vector<uint32_t>(1, 0x7dc9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dc9); auto const rel = std::vector<uint32_t>(1, 0x7dca); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dca); auto const rel = std::vector<uint32_t>(1, 0x7dcb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dcb); auto const rel = std::vector<uint32_t>(1, 0x7dcc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dcc); auto const rel = std::vector<uint32_t>(1, 0x7dcd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dcd); auto const rel = std::vector<uint32_t>(1, 0x7dce); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dce); auto const rel = std::vector<uint32_t>(1, 0x7dcf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dcf); auto const rel = std::vector<uint32_t>(1, 0x7dd1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dd1); auto const rel = std::vector<uint32_t>(1, 0x7dd2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dd2); auto const rel = std::vector<uint32_t>(1, 0x7dd4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dd4); auto const rel = std::vector<uint32_t>(1, 0x7dd5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7dd5); auto const rel = std::vector<uint32_t>(1, 0x42e8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x42e8); auto const rel = std::vector<uint32_t>(1, 0x42e9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x42e9); auto const rel = std::vector<uint32_t>(1, 0x42ec); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x42ec); auto const rel = std::vector<uint32_t>(1, 0x42ed); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x42ed); auto const rel = std::vector<uint32_t>(1, 0x42f1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x42f1); auto const rel = std::vector<uint32_t>(1, 0x26048); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26048); auto const rel = std::vector<uint32_t>(1, 0x26064); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26064); auto const rel = std::vector<uint32_t>(1, 0x7f25); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f25); auto const rel = std::vector<uint32_t>(1, 0x7f26); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f26); auto const rel = std::vector<uint32_t>(1, 0x7f27); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f27); auto const rel = std::vector<uint32_t>(1, 0x7f28); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f28); auto const rel = std::vector<uint32_t>(1, 0x7f29); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f29); auto const rel = std::vector<uint32_t>(1, 0x7f2a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_008) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f2a); auto const rel = std::vector<uint32_t>(1, 0x7f2b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f2b); auto const rel = std::vector<uint32_t>(1, 0x7f41); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f41); auto const rel = std::vector<uint32_t>(1, 0x7f42); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f42); auto const rel = std::vector<uint32_t>(1, 0x7f6f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f6f); auto const rel = std::vector<uint32_t>(1, 0x7f70); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f70); auto const rel = std::vector<uint32_t>(1, 0x7f71); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f71); auto const rel = std::vector<uint32_t>(1, 0x7f73); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f73); auto const rel = std::vector<uint32_t>(1, 0x7f74); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7f74); auto const rel = std::vector<uint32_t>(1, 0x7fab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fab); auto const rel = std::vector<uint32_t>(1, 0x7fde); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fde); auto const rel = std::vector<uint32_t>(1, 0x7fdf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fdf); auto const rel = std::vector<uint32_t>(1, 0x7fe0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fe0); auto const rel = std::vector<uint32_t>(1, 0x7fe1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fe1); auto const rel = std::vector<uint32_t>(1, 0x7fe2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fe2); auto const rel = std::vector<uint32_t>(1, 0x7fe3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fe3); auto const rel = std::vector<uint32_t>(1, 0x7fe4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fe4); auto const rel = std::vector<uint32_t>(1, 0x2644a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x2644a); auto const rel = std::vector<uint32_t>(1, 0x7fe5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x7fe5); auto const rel = std::vector<uint32_t>(1, 0x8023); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8023); auto const rel = std::vector<uint32_t>(1, 0x8024); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8024); auto const rel = std::vector<uint32_t>(1, 0x8025); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8025); auto const rel = std::vector<uint32_t>(1, 0x8059); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8059); auto const rel = std::vector<uint32_t>(1, 0x805a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x805a); auto const rel = std::vector<uint32_t>(1, 0x805b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x805b); auto const rel = std::vector<uint32_t>(1, 0x805c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x805c); auto const rel = std::vector<uint32_t>(1, 0x805d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x805d); auto const rel = std::vector<uint32_t>(1, 0x805e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x805e); auto const rel = std::vector<uint32_t>(1, 0x805f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x805f); auto const rel = std::vector<uint32_t>(1, 0x8061); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8061); auto const rel = std::vector<uint32_t>(1, 0x8062); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8062); auto const rel = std::vector<uint32_t>(1, 0x8063); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8063); auto const rel = std::vector<uint32_t>(1, 0x43ba); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x43ba); auto const rel = std::vector<uint32_t>(1, 0x265a0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x265a0); auto const rel = std::vector<uint32_t>(1, 0x8087); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8087); auto const rel = std::vector<uint32_t>(1, 0x8088); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8088); auto const rel = std::vector<uint32_t>(1, 0x8150); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8150); auto const rel = std::vector<uint32_t>(1, 0x817f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x817f); auto const rel = std::vector<uint32_t>(1, 0x8180); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8180); auto const rel = std::vector<uint32_t>(1, 0x8181); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8181); auto const rel = std::vector<uint32_t>(1, 0x8182); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8182); auto const rel = std::vector<uint32_t>(1, 0x8183); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8183); auto const rel = std::vector<uint32_t>(1, 0x8184); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8184); auto const rel = std::vector<uint32_t>(1, 0x8185); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8185); auto const rel = std::vector<uint32_t>(1, 0x8186); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8186); auto const rel = std::vector<uint32_t>(1, 0x8187); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8187); auto const rel = std::vector<uint32_t>(1, 0x8188); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8188); auto const rel = std::vector<uint32_t>(1, 0x8189); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8189); auto const rel = std::vector<uint32_t>(1, 0x818a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x818a); auto const rel = std::vector<uint32_t>(1, 0x818b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x818b); auto const rel = std::vector<uint32_t>(1, 0x818c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x818c); auto const rel = std::vector<uint32_t>(1, 0x818d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_009) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x818d); auto const rel = std::vector<uint32_t>(1, 0x818e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x818e); auto const rel = std::vector<uint32_t>(1, 0x818f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x818f); auto const rel = std::vector<uint32_t>(1, 0x8191); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8191); auto const rel = std::vector<uint32_t>(1, 0x4420); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4420); auto const rel = std::vector<uint32_t>(1, 0x4425); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4425); auto const rel = std::vector<uint32_t>(1, 0x4426); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4426); auto const rel = std::vector<uint32_t>(1, 0x26799); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26799); auto const rel = std::vector<uint32_t>(1, 0x267b3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x267b3); auto const rel = std::vector<uint32_t>(1, 0x267b4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x267b4); auto const rel = std::vector<uint32_t>(1, 0x267cc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x267cc); auto const rel = std::vector<uint32_t>(1, 0x81e7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x81e7); auto const rel = std::vector<uint32_t>(1, 0x81fa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x81fa); auto const rel = std::vector<uint32_t>(1, 0x8207); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8207); auto const rel = std::vector<uint32_t>(1, 0x8213); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8213); auto const rel = std::vector<uint32_t>(1, 0x8214); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8214); auto const rel = std::vector<uint32_t>(1, 0x8215); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8215); auto const rel = std::vector<uint32_t>(1, 0x821e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x821e); auto const rel = std::vector<uint32_t>(1, 0x824a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x824a); auto const rel = std::vector<uint32_t>(1, 0x824b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x824b); auto const rel = std::vector<uint32_t>(1, 0x824c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x824c); auto const rel = std::vector<uint32_t>(1, 0x824d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x824d); auto const rel = std::vector<uint32_t>(1, 0x26a51); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26a51); auto const rel = std::vector<uint32_t>(1, 0x26a52); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26a52); auto const rel = std::vector<uint32_t>(1, 0x44dd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44dd); auto const rel = std::vector<uint32_t>(1, 0x44de); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44de); auto const rel = std::vector<uint32_t>(1, 0x44df); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44df); auto const rel = std::vector<uint32_t>(1, 0x44e1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44e1); auto const rel = std::vector<uint32_t>(1, 0x44e4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44e4); auto const rel = std::vector<uint32_t>(1, 0x44e9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44e9); auto const rel = std::vector<uint32_t>(1, 0x44ea); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44ea); auto const rel = std::vector<uint32_t>(1, 0x44eb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44eb); auto const rel = std::vector<uint32_t>(1, 0x44ec); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x44ec); auto const rel = std::vector<uint32_t>(1, 0x8490); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8490); auto const rel = std::vector<uint32_t>(1, 0x8491); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8491); auto const rel = std::vector<uint32_t>(1, 0x8492); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8492); auto const rel = std::vector<uint32_t>(1, 0x8493); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8493); auto const rel = std::vector<uint32_t>(1, 0x8494); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8494); auto const rel = std::vector<uint32_t>(1, 0x8495); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8495); auto const rel = std::vector<uint32_t>(1, 0x8496); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8496); auto const rel = std::vector<uint32_t>(1, 0x8497); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8497); auto const rel = std::vector<uint32_t>(1, 0x8498); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8498); auto const rel = std::vector<uint32_t>(1, 0x8499); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8499); auto const rel = std::vector<uint32_t>(1, 0x849a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x849a); auto const rel = std::vector<uint32_t>(1, 0x849b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x849b); auto const rel = std::vector<uint32_t>(1, 0x849c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x849c); auto const rel = std::vector<uint32_t>(1, 0x849d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x849d); auto const rel = std::vector<uint32_t>(1, 0x849e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x849e); auto const rel = std::vector<uint32_t>(1, 0x849f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x849f); auto const rel = std::vector<uint32_t>(1, 0x84a0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a0); auto const rel = std::vector<uint32_t>(1, 0x84a1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a1); auto const rel = std::vector<uint32_t>(1, 0x84a2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_010) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a2); auto const rel = std::vector<uint32_t>(1, 0x84a3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a3); auto const rel = std::vector<uint32_t>(1, 0x84a4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a4); auto const rel = std::vector<uint32_t>(1, 0x84a5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a5); auto const rel = std::vector<uint32_t>(1, 0x84a6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a6); auto const rel = std::vector<uint32_t>(1, 0x84a7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a7); auto const rel = std::vector<uint32_t>(1, 0x84a8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a8); auto const rel = std::vector<uint32_t>(1, 0x84a9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84a9); auto const rel = std::vector<uint32_t>(1, 0x84aa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84aa); auto const rel = std::vector<uint32_t>(1, 0x84ab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84ab); auto const rel = std::vector<uint32_t>(1, 0x84ac); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84ac); auto const rel = std::vector<uint32_t>(1, 0x84ad); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84ad); auto const rel = std::vector<uint32_t>(1, 0x84ae); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84ae); auto const rel = std::vector<uint32_t>(1, 0x84af); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84af); auto const rel = std::vector<uint32_t>(1, 0x84b0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b0); auto const rel = std::vector<uint32_t>(1, 0x84b1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b1); auto const rel = std::vector<uint32_t>(1, 0x84b2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b2); auto const rel = std::vector<uint32_t>(1, 0x84b3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b3); auto const rel = std::vector<uint32_t>(1, 0x84b4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b4); auto const rel = std::vector<uint32_t>(1, 0x84b5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b5); auto const rel = std::vector<uint32_t>(1, 0x84b6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b6); auto const rel = std::vector<uint32_t>(1, 0x84b7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b7); auto const rel = std::vector<uint32_t>(1, 0x84b9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84b9); auto const rel = std::vector<uint32_t>(1, 0x84ba); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84ba); auto const rel = std::vector<uint32_t>(1, 0x84bb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84bb); auto const rel = std::vector<uint32_t>(1, 0x84bc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84bc); auto const rel = std::vector<uint32_t>(1, 0x84bd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84bd); auto const rel = std::vector<uint32_t>(1, 0x84be); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84be); auto const rel = std::vector<uint32_t>(1, 0x84bf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84bf); auto const rel = std::vector<uint32_t>(1, 0x84c0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84c0); auto const rel = std::vector<uint32_t>(1, 0x84c1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84c1); auto const rel = std::vector<uint32_t>(1, 0x84c2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84c2); auto const rel = std::vector<uint32_t>(1, 0x84c3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84c3); auto const rel = std::vector<uint32_t>(1, 0x84c4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84c4); auto const rel = std::vector<uint32_t>(1, 0x84c6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84c6); auto const rel = std::vector<uint32_t>(1, 0x84c7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84c7); auto const rel = std::vector<uint32_t>(1, 0x84c9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84c9); auto const rel = std::vector<uint32_t>(1, 0x84ca); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84ca); auto const rel = std::vector<uint32_t>(1, 0x84cb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84cb); auto const rel = std::vector<uint32_t>(1, 0x84cc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84cc); auto const rel = std::vector<uint32_t>(1, 0x84cd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84cd); auto const rel = std::vector<uint32_t>(1, 0x84ce); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84ce); auto const rel = std::vector<uint32_t>(1, 0x84cf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84cf); auto const rel = std::vector<uint32_t>(1, 0x84d0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d0); auto const rel = std::vector<uint32_t>(1, 0x84d1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d1); auto const rel = std::vector<uint32_t>(1, 0x84d2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d2); auto const rel = std::vector<uint32_t>(1, 0x84d3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d3); auto const rel = std::vector<uint32_t>(1, 0x84d4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d4); auto const rel = std::vector<uint32_t>(1, 0x84d5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d5); auto const rel = std::vector<uint32_t>(1, 0x84d6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d6); auto const rel = std::vector<uint32_t>(1, 0x84d7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d7); auto const rel = std::vector<uint32_t>(1, 0x84d8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_011) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d8); auto const rel = std::vector<uint32_t>(1, 0x84d9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84d9); auto const rel = std::vector<uint32_t>(1, 0x84da); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84da); auto const rel = std::vector<uint32_t>(1, 0x84db); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84db); auto const rel = std::vector<uint32_t>(1, 0x84dc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84dc); auto const rel = std::vector<uint32_t>(1, 0x84dd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84dd); auto const rel = std::vector<uint32_t>(1, 0x84df); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84df); auto const rel = std::vector<uint32_t>(1, 0x84e1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84e1); auto const rel = std::vector<uint32_t>(1, 0x84e2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84e2); auto const rel = std::vector<uint32_t>(1, 0x84e3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84e3); auto const rel = std::vector<uint32_t>(1, 0x84e4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84e4); auto const rel = std::vector<uint32_t>(1, 0x84e6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84e6); auto const rel = std::vector<uint32_t>(1, 0x26d74); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26d74); auto const rel = std::vector<uint32_t>(1, 0x26da0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26da0); auto const rel = std::vector<uint32_t>(1, 0x26da1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26da1); auto const rel = std::vector<uint32_t>(1, 0x26da2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26da2); auto const rel = std::vector<uint32_t>(1, 0x26da3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26da3); auto const rel = std::vector<uint32_t>(1, 0x26da4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26da4); auto const rel = std::vector<uint32_t>(1, 0x26da5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26da5); auto const rel = std::vector<uint32_t>(1, 0x26da6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26da6); auto const rel = std::vector<uint32_t>(1, 0x26da7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26da7); auto const rel = std::vector<uint32_t>(1, 0x26dae); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26dae); auto const rel = std::vector<uint32_t>(1, 0x26ddc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26ddc); auto const rel = std::vector<uint32_t>(1, 0x26dea); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26dea); auto const rel = std::vector<uint32_t>(1, 0x26deb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26deb); auto const rel = std::vector<uint32_t>(1, 0x26df0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x26df0); auto const rel = std::vector<uint32_t>(1, 0x84e5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x84e5); auto const rel = std::vector<uint32_t>(1, 0x8660); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8660); auto const rel = std::vector<uint32_t>(1, 0x8661); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8661); auto const rel = std::vector<uint32_t>(1, 0x271cd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x271cd); auto const rel = std::vector<uint32_t>(1, 0x8711); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8711); auto const rel = std::vector<uint32_t>(1, 0x8712); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8712); auto const rel = std::vector<uint32_t>(1, 0x872b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x872b); auto const rel = std::vector<uint32_t>(1, 0x8718); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8718); auto const rel = std::vector<uint32_t>(1, 0x8719); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8719); auto const rel = std::vector<uint32_t>(1, 0x871a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x871a); auto const rel = std::vector<uint32_t>(1, 0x871b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x871b); auto const rel = std::vector<uint32_t>(1, 0x871c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x871c); auto const rel = std::vector<uint32_t>(1, 0x871d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x871d); auto const rel = std::vector<uint32_t>(1, 0x871e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x871e); auto const rel = std::vector<uint32_t>(1, 0x871f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x871f); auto const rel = std::vector<uint32_t>(1, 0x8720); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8720); auto const rel = std::vector<uint32_t>(1, 0x8721); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8721); auto const rel = std::vector<uint32_t>(1, 0x8722); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8722); auto const rel = std::vector<uint32_t>(1, 0x8723); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8723); auto const rel = std::vector<uint32_t>(1, 0x8724); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8724); auto const rel = std::vector<uint32_t>(1, 0x8725); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8725); auto const rel = std::vector<uint32_t>(1, 0x8726); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8726); auto const rel = std::vector<uint32_t>(1, 0x8727); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8727); auto const rel = std::vector<uint32_t>(1, 0x8728); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8728); auto const rel = std::vector<uint32_t>(1, 0x8729); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8729); auto const rel = std::vector<uint32_t>(1, 0x872a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_012) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x872a); auto const rel = std::vector<uint32_t>(1, 0x872c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x872c); auto const rel = std::vector<uint32_t>(1, 0x872d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x872d); auto const rel = std::vector<uint32_t>(1, 0x872e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x872e); auto const rel = std::vector<uint32_t>(1, 0x872f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x872f); auto const rel = std::vector<uint32_t>(1, 0x8730); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8730); auto const rel = std::vector<uint32_t>(1, 0x8731); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8731); auto const rel = std::vector<uint32_t>(1, 0x8732); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8732); auto const rel = std::vector<uint32_t>(1, 0x8733); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8733); auto const rel = std::vector<uint32_t>(1, 0x8734); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8734); auto const rel = std::vector<uint32_t>(1, 0x8735); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8735); auto const rel = std::vector<uint32_t>(1, 0x8736); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8736); auto const rel = std::vector<uint32_t>(1, 0x8737); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8737); auto const rel = std::vector<uint32_t>(1, 0x8738); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8738); auto const rel = std::vector<uint32_t>(1, 0x8739); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8739); auto const rel = std::vector<uint32_t>(1, 0x873a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x873a); auto const rel = std::vector<uint32_t>(1, 0x873b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x873b); auto const rel = std::vector<uint32_t>(1, 0x873c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x873c); auto const rel = std::vector<uint32_t>(1, 0x873d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x873d); auto const rel = std::vector<uint32_t>(1, 0x873e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x873e); auto const rel = std::vector<uint32_t>(1, 0x873f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x873f); auto const rel = std::vector<uint32_t>(1, 0x8740); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8740); auto const rel = std::vector<uint32_t>(1, 0x8741); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8741); auto const rel = std::vector<uint32_t>(1, 0x8742); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8742); auto const rel = std::vector<uint32_t>(1, 0x8743); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8743); auto const rel = std::vector<uint32_t>(1, 0x8744); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8744); auto const rel = std::vector<uint32_t>(1, 0x8745); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8745); auto const rel = std::vector<uint32_t>(1, 0x8747); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8747); auto const rel = std::vector<uint32_t>(1, 0x8748); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8748); auto const rel = std::vector<uint32_t>(1, 0x8749); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8749); auto const rel = std::vector<uint32_t>(1, 0x874a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x874a); auto const rel = std::vector<uint32_t>(1, 0x874b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x874b); auto const rel = std::vector<uint32_t>(1, 0x8755); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8755); auto const rel = std::vector<uint32_t>(1, 0x876b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x876b); auto const rel = std::vector<uint32_t>(1, 0x88e2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88e2); auto const rel = std::vector<uint32_t>(1, 0x88e7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88e7); auto const rel = std::vector<uint32_t>(1, 0x88e8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88e8); auto const rel = std::vector<uint32_t>(1, 0x88e9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88e9); auto const rel = std::vector<uint32_t>(1, 0x88ea); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88ea); auto const rel = std::vector<uint32_t>(1, 0x88eb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88eb); auto const rel = std::vector<uint32_t>(1, 0x88ec); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88ec); auto const rel = std::vector<uint32_t>(1, 0x88ed); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88ed); auto const rel = std::vector<uint32_t>(1, 0x88ee); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88ee); auto const rel = std::vector<uint32_t>(1, 0x88ef); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88ef); auto const rel = std::vector<uint32_t>(1, 0x88f0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f0); auto const rel = std::vector<uint32_t>(1, 0x88f1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f1); auto const rel = std::vector<uint32_t>(1, 0x88f2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f2); auto const rel = std::vector<uint32_t>(1, 0x88f3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f3); auto const rel = std::vector<uint32_t>(1, 0x88f4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f4); auto const rel = std::vector<uint32_t>(1, 0x88f5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f5); auto const rel = std::vector<uint32_t>(1, 0x88f6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f6); auto const rel = std::vector<uint32_t>(1, 0x88f7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_013) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f7); auto const rel = std::vector<uint32_t>(1, 0x88f8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f8); auto const rel = std::vector<uint32_t>(1, 0x88f9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88f9); auto const rel = std::vector<uint32_t>(1, 0x88fa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88fa); auto const rel = std::vector<uint32_t>(1, 0x88fb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88fb); auto const rel = std::vector<uint32_t>(1, 0x88fc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88fc); auto const rel = std::vector<uint32_t>(1, 0x88fd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88fd); auto const rel = std::vector<uint32_t>(1, 0x88fe); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88fe); auto const rel = std::vector<uint32_t>(1, 0x88ff); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x88ff); auto const rel = std::vector<uint32_t>(1, 0x8900); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8900); auto const rel = std::vector<uint32_t>(1, 0x8902); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8902); auto const rel = std::vector<uint32_t>(1, 0x8903); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8903); auto const rel = std::vector<uint32_t>(1, 0x8904); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8904); auto const rel = std::vector<uint32_t>(1, 0x463b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x463b); auto const rel = std::vector<uint32_t>(1, 0x891a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x891a); auto const rel = std::vector<uint32_t>(1, 0x899d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x899d); auto const rel = std::vector<uint32_t>(1, 0x899e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x899e); auto const rel = std::vector<uint32_t>(1, 0x899f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x899f); auto const rel = std::vector<uint32_t>(1, 0x89a0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x89a0); auto const rel = std::vector<uint32_t>(1, 0x89a1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x89a1); auto const rel = std::vector<uint32_t>(1, 0x89cf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x89cf); auto const rel = std::vector<uint32_t>(1, 0x89e8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x89e8); auto const rel = std::vector<uint32_t>(1, 0x89e9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x89e9); auto const rel = std::vector<uint32_t>(1, 0x89ea); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x89ea); auto const rel = std::vector<uint32_t>(1, 0x89eb); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x89eb); auto const rel = std::vector<uint32_t>(1, 0x8a8b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a8b); auto const rel = std::vector<uint32_t>(1, 0x8a8c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a8c); auto const rel = std::vector<uint32_t>(1, 0x8a8d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a8d); auto const rel = std::vector<uint32_t>(1, 0x8a8e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a8e); auto const rel = std::vector<uint32_t>(1, 0x8a8f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a8f); auto const rel = std::vector<uint32_t>(1, 0x8a90); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a90); auto const rel = std::vector<uint32_t>(1, 0x8a91); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a91); auto const rel = std::vector<uint32_t>(1, 0x8a92); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a92); auto const rel = std::vector<uint32_t>(1, 0x8a93); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a93); auto const rel = std::vector<uint32_t>(1, 0x8a94); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a94); auto const rel = std::vector<uint32_t>(1, 0x8a96); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a96); auto const rel = std::vector<uint32_t>(1, 0x8a97); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a97); auto const rel = std::vector<uint32_t>(1, 0x8a98); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a98); auto const rel = std::vector<uint32_t>(1, 0x8a99); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a99); auto const rel = std::vector<uint32_t>(1, 0x8a9a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a9a); auto const rel = std::vector<uint32_t>(1, 0x8a9b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a9b); auto const rel = std::vector<uint32_t>(1, 0x8a9c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a9c); auto const rel = std::vector<uint32_t>(1, 0x8a9d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a9d); auto const rel = std::vector<uint32_t>(1, 0x8a9e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a9e); auto const rel = std::vector<uint32_t>(1, 0x8a9f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8a9f); auto const rel = std::vector<uint32_t>(1, 0x8aa1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa1); auto const rel = std::vector<uint32_t>(1, 0x8aa2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa2); auto const rel = std::vector<uint32_t>(1, 0x8aa3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa3); auto const rel = std::vector<uint32_t>(1, 0x8aa4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa4); auto const rel = std::vector<uint32_t>(1, 0x8aa5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa5); auto const rel = std::vector<uint32_t>(1, 0x8aa6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa6); auto const rel = std::vector<uint32_t>(1, 0x8aa7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_014) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa7); auto const rel = std::vector<uint32_t>(1, 0x8aa8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa8); auto const rel = std::vector<uint32_t>(1, 0x8aa9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aa9); auto const rel = std::vector<uint32_t>(1, 0x8aaa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aaa); auto const rel = std::vector<uint32_t>(1, 0x8aab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aab); auto const rel = std::vector<uint32_t>(1, 0x8aac); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aac); auto const rel = std::vector<uint32_t>(1, 0x8aad); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aad); auto const rel = std::vector<uint32_t>(1, 0x8aae); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8aae); auto const rel = std::vector<uint32_t>(1, 0x279fd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x279fd); auto const rel = std::vector<uint32_t>(1, 0x27a0a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x27a0a); auto const rel = std::vector<uint32_t>(1, 0x27a0e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x27a0e); auto const rel = std::vector<uint32_t>(1, 0x8c2d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c2d); auto const rel = std::vector<uint32_t>(1, 0x8c2e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c2e); auto const rel = std::vector<uint32_t>(1, 0x8c2f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c2f); auto const rel = std::vector<uint32_t>(1, 0x8c30); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c30); auto const rel = std::vector<uint32_t>(1, 0x8c31); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c31); auto const rel = std::vector<uint32_t>(1, 0x8c32); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c32); auto const rel = std::vector<uint32_t>(1, 0x8c3d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c3d); auto const rel = std::vector<uint32_t>(1, 0x8c67); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c67); auto const rel = std::vector<uint32_t>(1, 0x8c68); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c68); auto const rel = std::vector<uint32_t>(1, 0x8c69); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c69); auto const rel = std::vector<uint32_t>(1, 0x8c6a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c6a); auto const rel = std::vector<uint32_t>(1, 0x8c8b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c8b); auto const rel = std::vector<uint32_t>(1, 0x8c8c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c8c); auto const rel = std::vector<uint32_t>(1, 0x8c8d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8c8d); auto const rel = std::vector<uint32_t>(1, 0x8ccf); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8ccf); auto const rel = std::vector<uint32_t>(1, 0x8cd0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd0); auto const rel = std::vector<uint32_t>(1, 0x8cd1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd1); auto const rel = std::vector<uint32_t>(1, 0x8cd2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd2); auto const rel = std::vector<uint32_t>(1, 0x8cd3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd3); auto const rel = std::vector<uint32_t>(1, 0x8cd4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd4); auto const rel = std::vector<uint32_t>(1, 0x8cd5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd5); auto const rel = std::vector<uint32_t>(1, 0x8cd6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd6); auto const rel = std::vector<uint32_t>(1, 0x8cd7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd7); auto const rel = std::vector<uint32_t>(1, 0x8cd8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8cd8); auto const rel = std::vector<uint32_t>(1, 0x3562); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x3562); auto const rel = std::vector<uint32_t>(1, 0x27d8f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x27d8f); auto const rel = std::vector<uint32_t>(1, 0x27d98); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x27d98); auto const rel = std::vector<uint32_t>(1, 0x8d58); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d58); auto const rel = std::vector<uint32_t>(1, 0x8d59); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d59); auto const rel = std::vector<uint32_t>(1, 0x8d5a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d5a); auto const rel = std::vector<uint32_t>(1, 0x8d5b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d5b); auto const rel = std::vector<uint32_t>(1, 0x8d6b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d6b); auto const rel = std::vector<uint32_t>(1, 0x8d95); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d95); auto const rel = std::vector<uint32_t>(1, 0x8d96); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d96); auto const rel = std::vector<uint32_t>(1, 0x8d97); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d97); auto const rel = std::vector<uint32_t>(1, 0x8d98); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d98); auto const rel = std::vector<uint32_t>(1, 0x8d99); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d99); auto const rel = std::vector<uint32_t>(1, 0x8d9a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8d9a); auto const rel = std::vector<uint32_t>(1, 0x8dfc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8dfc); auto const rel = std::vector<uint32_t>(1, 0x8dfd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8dfd); auto const rel = std::vector<uint32_t>(1, 0x8dfe); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_015) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8dfe); auto const rel = std::vector<uint32_t>(1, 0x8dff); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8dff); auto const rel = std::vector<uint32_t>(1, 0x8e00); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e00); auto const rel = std::vector<uint32_t>(1, 0x8e01); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e01); auto const rel = std::vector<uint32_t>(1, 0x8e02); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e02); auto const rel = std::vector<uint32_t>(1, 0x8e03); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e03); auto const rel = std::vector<uint32_t>(1, 0x8e04); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e04); auto const rel = std::vector<uint32_t>(1, 0x8e05); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e05); auto const rel = std::vector<uint32_t>(1, 0x8e06); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e06); auto const rel = std::vector<uint32_t>(1, 0x8e07); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e07); auto const rel = std::vector<uint32_t>(1, 0x8e08); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e08); auto const rel = std::vector<uint32_t>(1, 0x8e09); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e09); auto const rel = std::vector<uint32_t>(1, 0x8e0a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e0a); auto const rel = std::vector<uint32_t>(1, 0x8e0b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e0b); auto const rel = std::vector<uint32_t>(1, 0x8e0c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e0c); auto const rel = std::vector<uint32_t>(1, 0x8e0d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e0d); auto const rel = std::vector<uint32_t>(1, 0x8e0e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8e0e); auto const rel = std::vector<uint32_t>(1, 0x47f4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x47f4); auto const rel = std::vector<uint32_t>(1, 0x28048); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x28048); auto const rel = std::vector<uint32_t>(1, 0x8eb3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8eb3); auto const rel = std::vector<uint32_t>(1, 0x8eb4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8eb4); auto const rel = std::vector<uint32_t>(1, 0x8eb5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8eb5); auto const rel = std::vector<uint32_t>(1, 0x8f0d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f0d); auto const rel = std::vector<uint32_t>(1, 0x8f0e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f0e); auto const rel = std::vector<uint32_t>(1, 0x8f0f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f0f); auto const rel = std::vector<uint32_t>(1, 0x8f10); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f10); auto const rel = std::vector<uint32_t>(1, 0x8f11); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f11); auto const rel = std::vector<uint32_t>(1, 0x8f12); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f12); auto const rel = std::vector<uint32_t>(1, 0x8f13); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f13); auto const rel = std::vector<uint32_t>(1, 0x8f14); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f14); auto const rel = std::vector<uint32_t>(1, 0x8f15); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f15); auto const rel = std::vector<uint32_t>(1, 0x28306); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x28306); auto const rel = std::vector<uint32_t>(1, 0x28318); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x28318); auto const rel = std::vector<uint32_t>(1, 0x8f95); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f95); auto const rel = std::vector<uint32_t>(1, 0x8f96); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f96); auto const rel = std::vector<uint32_t>(1, 0x8f97); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8f97); auto const rel = std::vector<uint32_t>(1, 0x8fa1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8fa1); auto const rel = std::vector<uint32_t>(1, 0x8fa2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8fa2); auto const rel = std::vector<uint32_t>(1, 0x8fa3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x8fa3); auto const rel = std::vector<uint32_t>(1, 0x9058); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9058); auto const rel = std::vector<uint32_t>(1, 0x9059); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9059); auto const rel = std::vector<uint32_t>(1, 0x905a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x905a); auto const rel = std::vector<uint32_t>(1, 0x905b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x905b); auto const rel = std::vector<uint32_t>(1, 0x905c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x905c); auto const rel = std::vector<uint32_t>(1, 0x905d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x905d); auto const rel = std::vector<uint32_t>(1, 0x905e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x905e); auto const rel = std::vector<uint32_t>(1, 0x905f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x905f); auto const rel = std::vector<uint32_t>(1, 0x9060); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9060); auto const rel = std::vector<uint32_t>(1, 0x9061); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9061); auto const rel = std::vector<uint32_t>(1, 0x9062); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9062); auto const rel = std::vector<uint32_t>(1, 0x9063); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9063); auto const rel = std::vector<uint32_t>(1, 0x9064); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_016) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9064); auto const rel = std::vector<uint32_t>(1, 0x9065); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9065); auto const rel = std::vector<uint32_t>(1, 0x90d2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x90d2); auto const rel = std::vector<uint32_t>(1, 0x9118); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9118); auto const rel = std::vector<uint32_t>(1, 0x9119); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9119); auto const rel = std::vector<uint32_t>(1, 0x911a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x911a); auto const rel = std::vector<uint32_t>(1, 0x911b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x911b); auto const rel = std::vector<uint32_t>(1, 0x911c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x911c); auto const rel = std::vector<uint32_t>(1, 0x911d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x911d); auto const rel = std::vector<uint32_t>(1, 0x911e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x911e); auto const rel = std::vector<uint32_t>(1, 0x911f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x911f); auto const rel = std::vector<uint32_t>(1, 0x9120); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9120); auto const rel = std::vector<uint32_t>(1, 0x9121); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9121); auto const rel = std::vector<uint32_t>(1, 0x9122); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9122); auto const rel = std::vector<uint32_t>(1, 0x9123); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9123); auto const rel = std::vector<uint32_t>(1, 0x9124); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9124); auto const rel = std::vector<uint32_t>(1, 0x9125); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9125); auto const rel = std::vector<uint32_t>(1, 0x9172); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9172); auto const rel = std::vector<uint32_t>(1, 0x9173); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9173); auto const rel = std::vector<uint32_t>(1, 0x9174); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9174); auto const rel = std::vector<uint32_t>(1, 0x9175); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9175); auto const rel = std::vector<uint32_t>(1, 0x9176); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9176); auto const rel = std::vector<uint32_t>(1, 0x9177); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9177); auto const rel = std::vector<uint32_t>(1, 0x9178); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9178); auto const rel = std::vector<uint32_t>(1, 0x9179); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9179); auto const rel = std::vector<uint32_t>(1, 0x917a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x917a); auto const rel = std::vector<uint32_t>(1, 0x917b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x917b); auto const rel = std::vector<uint32_t>(1, 0x917c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x917c); auto const rel = std::vector<uint32_t>(1, 0x917d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x917d); auto const rel = std::vector<uint32_t>(1, 0x917e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x917e); auto const rel = std::vector<uint32_t>(1, 0x917f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x917f); auto const rel = std::vector<uint32_t>(1, 0x48fa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x48fa); auto const rel = std::vector<uint32_t>(1, 0x922d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x922d); auto const rel = std::vector<uint32_t>(1, 0x9275); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9275); auto const rel = std::vector<uint32_t>(1, 0x9276); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9276); auto const rel = std::vector<uint32_t>(1, 0x9277); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9277); auto const rel = std::vector<uint32_t>(1, 0x9278); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9278); auto const rel = std::vector<uint32_t>(1, 0x9279); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9279); auto const rel = std::vector<uint32_t>(1, 0x927a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x927a); auto const rel = std::vector<uint32_t>(1, 0x927b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x927b); auto const rel = std::vector<uint32_t>(1, 0x927d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x927d); auto const rel = std::vector<uint32_t>(1, 0x927e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x927e); auto const rel = std::vector<uint32_t>(1, 0x927f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x927f); auto const rel = std::vector<uint32_t>(1, 0x9280); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9280); auto const rel = std::vector<uint32_t>(1, 0x9281); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9281); auto const rel = std::vector<uint32_t>(1, 0x9282); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9282); auto const rel = std::vector<uint32_t>(1, 0x9283); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9283); auto const rel = std::vector<uint32_t>(1, 0x9284); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9284); auto const rel = std::vector<uint32_t>(1, 0x9285); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9285); auto const rel = std::vector<uint32_t>(1, 0x9286); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9286); auto const rel = std::vector<uint32_t>(1, 0x9287); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9287); auto const rel = std::vector<uint32_t>(1, 0x9288); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_017) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9288); auto const rel = std::vector<uint32_t>(1, 0x9289); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9289); auto const rel = std::vector<uint32_t>(1, 0x928a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x928a); auto const rel = std::vector<uint32_t>(1, 0x928b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x928b); auto const rel = std::vector<uint32_t>(1, 0x928c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x928c); auto const rel = std::vector<uint32_t>(1, 0x928d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x928d); auto const rel = std::vector<uint32_t>(1, 0x928e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x928e); auto const rel = std::vector<uint32_t>(1, 0x9290); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9290); auto const rel = std::vector<uint32_t>(1, 0x9291); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9291); auto const rel = std::vector<uint32_t>(1, 0x9292); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9292); auto const rel = std::vector<uint32_t>(1, 0x9293); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9293); auto const rel = std::vector<uint32_t>(1, 0x9294); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9294); auto const rel = std::vector<uint32_t>(1, 0x9295); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9295); auto const rel = std::vector<uint32_t>(1, 0x9296); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9296); auto const rel = std::vector<uint32_t>(1, 0x9297); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9297); auto const rel = std::vector<uint32_t>(1, 0x9298); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9298); auto const rel = std::vector<uint32_t>(1, 0x9299); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9299); auto const rel = std::vector<uint32_t>(1, 0x929a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x929a); auto const rel = std::vector<uint32_t>(1, 0x929b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x929b); auto const rel = std::vector<uint32_t>(1, 0x929c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x929c); auto const rel = std::vector<uint32_t>(1, 0x929d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x929d); auto const rel = std::vector<uint32_t>(1, 0x929e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x929e); auto const rel = std::vector<uint32_t>(1, 0x929f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x929f); auto const rel = std::vector<uint32_t>(1, 0x92a0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a0); auto const rel = std::vector<uint32_t>(1, 0x92a1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a1); auto const rel = std::vector<uint32_t>(1, 0x92a2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a2); auto const rel = std::vector<uint32_t>(1, 0x92a3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a3); auto const rel = std::vector<uint32_t>(1, 0x92a4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a4); auto const rel = std::vector<uint32_t>(1, 0x92a5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a5); auto const rel = std::vector<uint32_t>(1, 0x92a6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a6); auto const rel = std::vector<uint32_t>(1, 0x92a7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a7); auto const rel = std::vector<uint32_t>(1, 0x92a8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a8); auto const rel = std::vector<uint32_t>(1, 0x92a9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92a9); auto const rel = std::vector<uint32_t>(1, 0x92aa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92aa); auto const rel = std::vector<uint32_t>(1, 0x92ab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92ab); auto const rel = std::vector<uint32_t>(1, 0x92ac); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92ac); auto const rel = std::vector<uint32_t>(1, 0x92ad); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92ad); auto const rel = std::vector<uint32_t>(1, 0x92ae); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92ae); auto const rel = std::vector<uint32_t>(1, 0x92af); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92af); auto const rel = std::vector<uint32_t>(1, 0x92b0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92b0); auto const rel = std::vector<uint32_t>(1, 0x92b1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92b1); auto const rel = std::vector<uint32_t>(1, 0x4924); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4924); auto const rel = std::vector<uint32_t>(1, 0x4925); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4925); auto const rel = std::vector<uint32_t>(1, 0x4926); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4926); auto const rel = std::vector<uint32_t>(1, 0x492a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x492a); auto const rel = std::vector<uint32_t>(1, 0x28989); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x28989); auto const rel = std::vector<uint32_t>(1, 0x289a8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x289a8); auto const rel = std::vector<uint32_t>(1, 0x289aa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x289aa); auto const rel = std::vector<uint32_t>(1, 0x289ab); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x289ab); auto const rel = std::vector<uint32_t>(1, 0x92ee); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x92ee); auto const rel = std::vector<uint32_t>(1, 0x927c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x927c); auto const rel = std::vector<uint32_t>(1, 0x9532); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_018) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9532); auto const rel = std::vector<uint32_t>(1, 0x9533); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9533); auto const rel = std::vector<uint32_t>(1, 0x9534); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9534); auto const rel = std::vector<uint32_t>(1, 0x9535); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9535); auto const rel = std::vector<uint32_t>(1, 0x9536); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9536); auto const rel = std::vector<uint32_t>(1, 0x9537); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9537); auto const rel = std::vector<uint32_t>(1, 0x9538); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9538); auto const rel = std::vector<uint32_t>(1, 0x9539); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9539); auto const rel = std::vector<uint32_t>(1, 0x953a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x953a); auto const rel = std::vector<uint32_t>(1, 0x953b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x953b); auto const rel = std::vector<uint32_t>(1, 0x953c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x953c); auto const rel = std::vector<uint32_t>(1, 0x953d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x953d); auto const rel = std::vector<uint32_t>(1, 0x953e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x953e); auto const rel = std::vector<uint32_t>(1, 0x953f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x953f); auto const rel = std::vector<uint32_t>(1, 0x9540); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9540); auto const rel = std::vector<uint32_t>(1, 0x9541); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9541); auto const rel = std::vector<uint32_t>(1, 0x9542); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9542); auto const rel = std::vector<uint32_t>(1, 0x9543); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9543); auto const rel = std::vector<uint32_t>(1, 0x9544); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9544); auto const rel = std::vector<uint32_t>(1, 0x9545); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9545); auto const rel = std::vector<uint32_t>(1, 0x95a1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a1); auto const rel = std::vector<uint32_t>(1, 0x95a2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a2); auto const rel = std::vector<uint32_t>(1, 0x95a3); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a3); auto const rel = std::vector<uint32_t>(1, 0x95a4); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a4); auto const rel = std::vector<uint32_t>(1, 0x95a5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a5); auto const rel = std::vector<uint32_t>(1, 0x95a6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a6); auto const rel = std::vector<uint32_t>(1, 0x95a7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a7); auto const rel = std::vector<uint32_t>(1, 0x95a8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a8); auto const rel = std::vector<uint32_t>(1, 0x95a9); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95a9); auto const rel = std::vector<uint32_t>(1, 0x95aa); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x95aa); auto const rel = std::vector<uint32_t>(1, 0x961a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x961a); auto const rel = std::vector<uint32_t>(1, 0x9699); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9699); auto const rel = std::vector<uint32_t>(1, 0x969a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x969a); auto const rel = std::vector<uint32_t>(1, 0x969b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x969b); auto const rel = std::vector<uint32_t>(1, 0x969c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x969c); auto const rel = std::vector<uint32_t>(1, 0x969d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x969d); auto const rel = std::vector<uint32_t>(1, 0x969e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x969e); auto const rel = std::vector<uint32_t>(1, 0x969f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x969f); auto const rel = std::vector<uint32_t>(1, 0x96a0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x96a0); auto const rel = std::vector<uint32_t>(1, 0x96a1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x96a1); auto const rel = std::vector<uint32_t>(1, 0x96cc); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x96cc); auto const rel = std::vector<uint32_t>(1, 0x96d0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x96d0); auto const rel = std::vector<uint32_t>(1, 0x96d1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x96d1); auto const rel = std::vector<uint32_t>(1, 0x96d2); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x96d2); auto const rel = std::vector<uint32_t>(1, 0x28fc5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x28fc5); auto const rel = std::vector<uint32_t>(1, 0x96ff); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x96ff); auto const rel = std::vector<uint32_t>(1, 0x9700); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9700); auto const rel = std::vector<uint32_t>(1, 0x9701); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9701); auto const rel = std::vector<uint32_t>(1, 0x4a0f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4a0f); auto const rel = std::vector<uint32_t>(1, 0x290af); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x290af); auto const rel = std::vector<uint32_t>(1, 0x290b0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x290b0); auto const rel = std::vector<uint32_t>(1, 0x290b1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } } TEST(tailoring, zh_stroke_014_019) { { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x290b1); auto const rel = std::vector<uint32_t>(1, 0x9757); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9757); auto const rel = std::vector<uint32_t>(1, 0x9758); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9758); auto const rel = std::vector<uint32_t>(1, 0x9759); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9759); auto const rel = std::vector<uint32_t>(1, 0x9764); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9764); auto const rel = std::vector<uint32_t>(1, 0x977a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x977a); auto const rel = std::vector<uint32_t>(1, 0x977b); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x977b); auto const rel = std::vector<uint32_t>(1, 0x977c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x977c); auto const rel = std::vector<uint32_t>(1, 0x977d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x977d); auto const rel = std::vector<uint32_t>(1, 0x977e); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x977e); auto const rel = std::vector<uint32_t>(1, 0x977f); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x977f); auto const rel = std::vector<uint32_t>(1, 0x9780); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9780); auto const rel = std::vector<uint32_t>(1, 0x9781); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9781); auto const rel = std::vector<uint32_t>(1, 0x9782); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9782); auto const rel = std::vector<uint32_t>(1, 0x9783); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9783); auto const rel = std::vector<uint32_t>(1, 0x9784); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9784); auto const rel = std::vector<uint32_t>(1, 0x9785); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9785); auto const rel = std::vector<uint32_t>(1, 0x9786); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9786); auto const rel = std::vector<uint32_t>(1, 0x97cd); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x97cd); auto const rel = std::vector<uint32_t>(1, 0x97ce); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x97ce); auto const rel = std::vector<uint32_t>(1, 0x97ec); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x97ec); auto const rel = std::vector<uint32_t>(1, 0x97f6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x97f6); auto const rel = std::vector<uint32_t>(1, 0x97f7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x97f7); auto const rel = std::vector<uint32_t>(1, 0x2941d); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x2941d); auto const rel = std::vector<uint32_t>(1, 0x9819); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9819); auto const rel = std::vector<uint32_t>(1, 0x9814); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9814); auto const rel = std::vector<uint32_t>(1, 0x9815); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9815); auto const rel = std::vector<uint32_t>(1, 0x9816); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9816); auto const rel = std::vector<uint32_t>(1, 0x9817); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9817); auto const rel = std::vector<uint32_t>(1, 0x9818); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9818); auto const rel = std::vector<uint32_t>(1, 0x981a); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x981a); auto const rel = std::vector<uint32_t>(1, 0x4ab8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4ab8); auto const rel = std::vector<uint32_t>(1, 0x9897); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9897); auto const rel = std::vector<uint32_t>(1, 0x98ad); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98ad); auto const rel = std::vector<uint32_t>(1, 0x98ae); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98ae); auto const rel = std::vector<uint32_t>(1, 0x98af); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98af); auto const rel = std::vector<uint32_t>(1, 0x98b0); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98b0); auto const rel = std::vector<uint32_t>(1, 0x98b1); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98b1); auto const rel = std::vector<uint32_t>(1, 0x4aff); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4aff); auto const rel = std::vector<uint32_t>(1, 0x4b00); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4b00); auto const rel = std::vector<uint32_t>(1, 0x295b8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x295b8); auto const rel = std::vector<uint32_t>(1, 0x98d6); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98d6); auto const rel = std::vector<uint32_t>(1, 0x98d5); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98d5); auto const rel = std::vector<uint32_t>(1, 0x98d7); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98d7); auto const rel = std::vector<uint32_t>(1, 0x98f8); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x98f8); auto const rel = std::vector<uint32_t>(1, 0x4b2c); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x4b2c); auto const rel = std::vector<uint32_t>(1, 0x9900); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9900); auto const rel = std::vector<uint32_t>(1, 0x9901); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9901); auto const rel = std::vector<uint32_t>(1, 0x9902); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9902); auto const rel = std::vector<uint32_t>(1, 0x9903); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9903); auto const rel = std::vector<uint32_t>(1, 0x9904); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } { // greater than (or equal to, for =) preceeding cps auto const res = std::vector<uint32_t>(1, 0x9904); auto const rel = std::vector<uint32_t>(1, 0x9905); EXPECT_EQ(collate( res.begin(), res.end(), rel.begin(), rel.end(), table(), collation_strength::primary), -1); } }
ASTRO-Strobel/tsduck
src/libtsduck/dtv/descriptors/tsStreamEventDescriptor.cpp
//---------------------------------------------------------------------------- // // TSDuck - The MPEG Transport Stream Toolkit // Copyright (c) 2005-2020, <NAME> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF // THE POSSIBILITY OF SUCH DAMAGE. // //---------------------------------------------------------------------------- #include "tsStreamEventDescriptor.h" #include "tsDescriptor.h" #include "tsTablesDisplay.h" #include "tsTablesFactory.h" #include "tsxmlElement.h" TSDUCK_SOURCE; #define MY_XML_NAME u"stream_event_descriptor" #define MY_DID ts::DID_STREAM_EVENT #define MY_STD ts::STD_MPEG TS_XML_DESCRIPTOR_FACTORY(ts::StreamEventDescriptor, MY_XML_NAME); TS_ID_DESCRIPTOR_FACTORY(ts::StreamEventDescriptor, ts::EDID::Standard(MY_DID)); TS_FACTORY_REGISTER(ts::StreamEventDescriptor::DisplayDescriptor, ts::EDID::Standard(MY_DID)); //---------------------------------------------------------------------------- // Constructors //---------------------------------------------------------------------------- ts::StreamEventDescriptor::StreamEventDescriptor(uint16_t id, uint64_t npt) : AbstractDescriptor(MY_DID, MY_XML_NAME, MY_STD, 0), event_id(id), event_NPT(npt), private_data() { _is_valid = true; } ts::StreamEventDescriptor::StreamEventDescriptor(DuckContext& duck, const Descriptor& desc) : StreamEventDescriptor() { deserialize(duck, desc); } //---------------------------------------------------------------------------- // Serialization //---------------------------------------------------------------------------- void ts::StreamEventDescriptor::serialize(DuckContext& duck, Descriptor& desc) const { ByteBlockPtr bbp(serializeStart()); bbp->appendUInt16(event_id); bbp->appendUInt64(TS_UCONST64(0xFFFFFFFE00000000) | event_NPT); bbp->append(private_data); serializeEnd(desc, bbp); } //---------------------------------------------------------------------------- // Deserialization //---------------------------------------------------------------------------- void ts::StreamEventDescriptor::deserialize(DuckContext& duck, const Descriptor& desc) { _is_valid = desc.isValid() && desc.tag() == _tag && desc.payloadSize() >= 10; if (_is_valid) { const uint8_t* data = desc.payload(); size_t size = desc.payloadSize(); event_id = GetUInt16(data); event_NPT = GetUInt64(data + 2) & TS_UCONST64(0x00000001FFFFFFFF); private_data.copy (data + 10, size - 10); } } //---------------------------------------------------------------------------- // Check if all bytes in private part are ASCII characters. //---------------------------------------------------------------------------- bool ts::StreamEventDescriptor::asciiPrivate() const { bool ascii = !private_data.empty(); for (size_t i = 0; ascii && i < private_data.size(); ++i) { ascii = private_data[i] >= 0x20 && private_data[i] < 0x80; } return ascii; } //---------------------------------------------------------------------------- // Static method to display a descriptor. //---------------------------------------------------------------------------- void ts::StreamEventDescriptor::DisplayDescriptor(TablesDisplay& display, DID did, const uint8_t* data, size_t size, int indent, TID tid, PDS pds) { std::ostream& strm(display.duck().out()); if (size >= 10) { const std::string margin(indent, ' '); // Extract common part const uint16_t id = GetUInt16(data); const uint64_t npt = GetUInt64(data + 2) & TS_UCONST64(0x00000001FFFFFFFF); data += 10; size -= 10; strm << margin << UString::Format(u"Event id: 0x%X (%d), NPT: 0x%09X (%d)", {id, id, npt, npt}) << std::endl; // Private part. if (size > 0) { strm << margin << "Private data:" << std::endl << UString::Dump(data, size, UString::HEXA | UString::ASCII | UString::OFFSET, indent); data += size; size = 0; } } display.displayExtraData(data, size, indent); } //---------------------------------------------------------------------------- // XML serialization //---------------------------------------------------------------------------- void ts::StreamEventDescriptor::buildXML(DuckContext& duck, xml::Element* root) const { root->setIntAttribute(u"event_id", event_id, true); root->setIntAttribute(u"event_NPT", event_NPT, true); if (!private_data.empty()) { if (asciiPrivate()) { root->addElement(u"private_text")->addText(UString::FromUTF8(reinterpret_cast<const char*>(private_data.data()), private_data.size())); } else { root->addElement(u"private_data")->addHexaText(private_data); } } } //---------------------------------------------------------------------------- // XML deserialization //---------------------------------------------------------------------------- void ts::StreamEventDescriptor::fromXML(DuckContext& duck, const xml::Element* element) { UString text; _is_valid = checkXMLName(element) && element->getIntAttribute<uint16_t>(event_id, u"event_id", true, 0, 0x0000, 0xFFFF) && element->getIntAttribute<uint64_t>(event_NPT, u"event_NPT", true, 0, 0, TS_UCONST64(0x00000001FFFFFFFF)) && element->getHexaTextChild(private_data, u"private_data", false, 0, MAX_DESCRIPTOR_SIZE - 10) && element->getTextChild(text, u"private_text", false, false, UString(), 0, MAX_DESCRIPTOR_SIZE - 10); if (_is_valid && !text.empty()) { if (private_data.empty()) { private_data.appendUTF8(text); } else { element->report().error(u"In <%s> at line %d, <private_data> and <private_text> are mutually exclusive", {element->name(), element->lineNumber()}); } } }
coutouly/nenupy
nenupy/astro/__init__.py
#! /usr/bin/python3 # -*- coding: utf-8 -*- from .astro_tools import * import json from os.path import join, dirname with open(join(dirname(__file__), "common_sources.json")) as sources: common_sources = json.load(sources)
timtim17/myuw
myuw_vue/tests/calendar-sidebar-links.test.js
<reponame>timtim17/myuw import axios from 'axios'; import { mount } from '@vue/test-utils'; import { createLocalVue } from './helper'; import Vuex from 'vuex'; import category_links from '../vuex/store/category_links'; import CalSidebarLinks from '../components/calendar/sidebar-links.vue'; import mockCalLinks from './mock_data/category_links/calendar.json'; const localVue = createLocalVue(Vuex); jest.mock('axios'); describe('Calendar Sidebar Links', () => { let store; beforeEach(() => { store = new Vuex.Store({ modules: { category_links, }, }); }); it('Computed Properties', async () => { axios.get.mockImplementation((url) => { const urlData = { '/api/v1/categorylinks/pagecalendar': mockCalLinks, }; return Promise.resolve({data: urlData[url], status: 200}); }); const wrapper = mount(CalSidebarLinks, { store, localVue }); await new Promise(setImmediate); expect(wrapper.vm.isReady).toBeTruthy(); expect(wrapper.vm.isErrored).toBe(false); expect(wrapper.vm.pagecalendarLinks.category_name).toBe("PageCalendar"); expect(wrapper.vm.pagecalendarLinks.link_data[0].links.length).toBe(4); }); });
wuniversales/deploy-to-skynet-action
node_modules/@skynetlabs/skynet-nodejs/scripts/get-metadata.js
<filename>node_modules/@skynetlabs/skynet-nodejs/scripts/get-metadata.js /** * Demo script that gets metadata for all skylinks passed in as CLI arguments. * * Example usage: node scripts/get-metadata.js <skylink> */ const process = require("process"); const { SkynetClient } = require(".."); const client = new SkynetClient(); const promises = process.argv // Ignore the first two arguments. .slice(2) .map(async (skylink) => await client.getMetadata(skylink)); (async () => { const results = await Promise.allSettled(promises); results.forEach((result) => { if (result.status === "fulfilled") { console.log(result.value); } else { console.log(result.reason); } }); })();
kmdkuk/AndroidTraining
AndroidStudio/assignments/fundamentals/1st/LayoutAssignment/src/main/java/jp/mixi/assignment/layout/MainActivity.java
package jp.mixi.assignment.layout; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); findViewById(R.id.assignment1_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Context context = view.getContext(); context.startActivity(new Intent(context, Assignment1Activity.class)); } }); findViewById(R.id.assignment2_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Context context = view.getContext(); context.startActivity(new Intent(context, Assignment2Activity.class)); } }); findViewById(R.id.assignment3_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Context context = view.getContext(); context.startActivity(new Intent(context, Assignment3Activity.class)); } }); findViewById(R.id.assignment4_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Context context = view.getContext(); context.startActivity(new Intent(context, Assignment4Activity.class)); } }); } }
stbly/gemp-swccg-public
gemp-swccg-cards/src/main/java/com/gempukku/swccgo/cards/set9/dark/Card9_134.java
package com.gempukku.swccgo.cards.set9.dark; import com.gempukku.swccgo.cards.AbstractNormalEffect; import com.gempukku.swccgo.cards.GameConditions; import com.gempukku.swccgo.common.*; import com.gempukku.swccgo.cards.conditions.OnTableCondition; import com.gempukku.swccgo.logic.conditions.NotCondition; import com.gempukku.swccgo.filters.Filter; import com.gempukku.swccgo.filters.Filters; import com.gempukku.swccgo.game.PhysicalCard; import com.gempukku.swccgo.game.SwccgGame; import com.gempukku.swccgo.logic.conditions.Condition; import com.gempukku.swccgo.logic.TriggerConditions; import com.gempukku.swccgo.logic.actions.RequiredGameTextTriggerAction; import com.gempukku.swccgo.logic.effects.LoseForceEffect; import com.gempukku.swccgo.logic.modifiers.ImmuneToTitleModifier; import com.gempukku.swccgo.logic.modifiers.Modifier; import com.gempukku.swccgo.logic.modifiers.ModifyGameTextType; import com.gempukku.swccgo.logic.timing.EffectResult; import java.util.Collections; import java.util.LinkedList; import java.util.List; /** * Set: Death Star II * Type: Effect * Title: Your Destiny */ public class Card9_134 extends AbstractNormalEffect { public Card9_134() { super(Side.DARK, 0, PlayCardZoneOption.ATTACHED, Title.Your_Destiny, Uniqueness.UNIQUE); setLore("Luke's destiny lies with his father, <NAME>. To become a Jedi Knight, Luke must accept this."); setGameText("Deploy on Bring Him Before Me. When Vader is present at a battleground site, at start of your turn opponent loses 3 Force unless Luke is captured, out of play, or present at a battleground site. Also, Luke is immune to Responsibility Of Command. (Immune to Alter.)"); addIcons(Icon.DEATH_STAR_II); addImmuneToCardTitle(Title.Alter); } @Override protected Filter getGameTextValidDeployTargetFilter(SwccgGame game, PhysicalCard self, PlayCardOptionId playCardOptionId, boolean asReact) { return Filters.Bring_Him_Before_Me; } @Override protected List<RequiredGameTextTriggerAction> getGameTextRequiredAfterTriggers(SwccgGame game, final EffectResult effectResult, final PhysicalCard self, int gameTextSourceCardId) { String opponent = game.getOpponent(self.getOwner()); boolean targetsLeiaInsteadOfLuke = GameConditions.hasGameTextModification(game, self, ModifyGameTextType.BRING_HIM_BEFORE_ME__TARGETS_LEIA_INSTEAD_OF_LUKE); if (targetsLeiaInsteadOfLuke) { // Check condition(s) if (TriggerConditions.isStartOfYourTurn(game, effectResult, self) && GameConditions.canSpot(game, self, Filters.and(Filters.Vader, Filters.presentAt(Filters.battleground_site))) && !GameConditions.canSpot(game, self, SpotOverride.INCLUDE_CAPTIVE, Filters.and(Filters.Leia, Filters.or(Filters.captive, Filters.presentAt(Filters.battleground_site)))) && !GameConditions.isOutOfPlay(game, Filters.Leia)) { final RequiredGameTextTriggerAction action = new RequiredGameTextTriggerAction(self, gameTextSourceCardId); action.setText("Make " + opponent + " lose 3 Force"); // Perform result(s) action.appendEffect( new LoseForceEffect(action, opponent, 3)); return Collections.singletonList(action); } return null; } else { // Check condition(s) if (TriggerConditions.isStartOfYourTurn(game, effectResult, self) && GameConditions.canSpot(game, self, Filters.and(Filters.Vader, Filters.presentAt(Filters.battleground_site))) && !GameConditions.canSpot(game, self, SpotOverride.INCLUDE_CAPTIVE, Filters.and(Filters.Luke, Filters.or(Filters.captive, Filters.presentAt(Filters.battleground_site)))) && !GameConditions.isOutOfPlay(game, Filters.Luke)) { final RequiredGameTextTriggerAction action = new RequiredGameTextTriggerAction(self, gameTextSourceCardId); action.setText("Make " + opponent + " lose 3 Force"); // Perform result(s) action.appendEffect( new LoseForceEffect(action, opponent, 3)); return Collections.singletonList(action); } return null; } } @Override protected List<Modifier> getGameTextWhileActiveInPlayModifiers(SwccgGame game, final PhysicalCard self) { List<Modifier> modifiers = new LinkedList<Modifier>(); Condition targetLeiaInsteadOfLuke = new OnTableCondition(self, Filters.There_Is_Another); Condition targetLuke = new NotCondition(targetLeiaInsteadOfLuke); modifiers.add(new ImmuneToTitleModifier(self, Filters.Leia, targetLeiaInsteadOfLuke, Title.Responsibility_Of_Command)); modifiers.add(new ImmuneToTitleModifier(self, Filters.Luke, targetLuke, Title.Responsibility_Of_Command)); return modifiers; } @Override protected List<Modifier> getGameTextWhileInactiveInPlayModifiers(SwccgGame game, final PhysicalCard self) { List<Modifier> modifiers = new LinkedList<Modifier>(); Condition targetLeiaInsteadOfLuke = new OnTableCondition(self, Filters.There_Is_Another); Condition targetLuke = new NotCondition(targetLeiaInsteadOfLuke); modifiers.add(new ImmuneToTitleModifier(self, Filters.Leia, targetLeiaInsteadOfLuke, Title.Responsibility_Of_Command)); modifiers.add(new ImmuneToTitleModifier(self, Filters.Luke, targetLuke, Title.Responsibility_Of_Command)); return modifiers; } }
gizzmo25/pythoncode-tutorials
web-scraping/extract-and-fill-forms/form_extractor.py
<reponame>gizzmo25/pythoncode-tutorials from bs4 import BeautifulSoup from requests_html import HTMLSession from pprint import pprint # initialize an HTTP session session = HTMLSession() def get_all_forms(url): """Returns all form tags found on a web page's `url` """ # GET request res = session.get(url) # for javascript driven website # res.html.render() soup = BeautifulSoup(res.html.html, "html.parser") return soup.find_all("form") def get_form_details(form): """Returns the HTML details of a form, including action, method and list of form controls (inputs, etc)""" details = {} # get the form action (requested URL) action = form.attrs.get("action").lower() # get the form method (POST, GET, DELETE, etc) # if not specified, GET is the default in HTML method = form.attrs.get("method", "get").lower() # get all form inputs inputs = [] for input_tag in form.find_all("input"): # get type of input form control input_type = input_tag.attrs.get("type", "text") # get name attribute input_name = input_tag.attrs.get("name") # get the default value of that input tag input_value =input_tag.attrs.get("value", "") # add everything to that list inputs.append({"type": input_type, "name": input_name, "value": input_value}) # put everything to the resulting dictionary details["action"] = action details["method"] = method details["inputs"] = inputs return details if __name__ == "__main__": import sys # get URL from the command line url = sys.argv[1] # get all form tags forms = get_all_forms(url) # iteratte over forms for i, form in enumerate(forms, start=1): form_details = get_form_details(form) print("="*50, f"form #{i}", "="*50) pprint(form_details)
ahmounir/UIC-barcode
src/test/java/org/uic/barcode/asn1/test/UperEncodeStringTest.java
package org.uic.barcode.asn1.test; import static org.junit.Assert.assertEquals; import java.util.logging.Level; import org.junit.Test; import org.uic.barcode.asn1.datatypes.Asn1Optional; import org.uic.barcode.asn1.datatypes.CharacterRestriction; import org.uic.barcode.asn1.datatypes.FieldOrder; import org.uic.barcode.asn1.datatypes.RestrictedString; import org.uic.barcode.asn1.datatypes.Sequence; import org.uic.barcode.asn1.uper.UperEncoder; public class UperEncodeStringTest { /** * Example from the Standard on UPER. <pre> World-Schema DEFINITIONS AUTOMATIC TAGS ::= BEGIN TestRecord ::= [APPLICATION 0] IMPLICIT SEQUENCE { testString1 UTF8String OPTIONAL, testString2 IA5String OPTIONAL } END </pre> */ @Sequence public static class TestRecord { @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional() String valueUtf8; @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional() String valueIA5; public TestRecord() { } public TestRecord(String utf8, String ia5) { this.valueUtf8 = utf8; this.valueIA5 = ia5; } } @Test public void testEncode() throws IllegalArgumentException, IllegalAccessException { //Teststring: AêñüC String original = new String("A" + "\u00ea" + "\u00f1" + "\u00fc" + "C"); TestRecord record = new TestRecord(original, "Meier"); byte[] encoded = UperEncoder.encode(record); String hex = UperEncoder.hexStringFromBytes(encoded); UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); assertEquals("C21070EAB0EC70EF10C166E5D39790",hex); } @Test public void testEncodeUtf8() throws IllegalArgumentException, IllegalAccessException { //"你好�" String original = new String("\u00e4" + "\u00bd" + "\u00a0" + "\u00e5" + "\u00a5" + "\u00bd" + "\u00e5" + "\u0090" + "\u0097"); TestRecord record = new TestRecord(original, "Meier"); byte[] encoded = UperEncoder.encode(record); String hex = UperEncoder.hexStringFromBytes(encoded); UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); assertEquals("C4B0E930AF70A830E970A970AF70E970A430A5C166E5D39790",hex); } @Test public void testDecode() throws IllegalArgumentException, IllegalAccessException { //Teststring: AêñüC String original = new String("A" + "\u00ea" + "\u00f1" + "\u00fc" + "C"); TestRecord record = new TestRecord(original, "Meier"); byte[] encoded = UperEncoder.encode(record); String hex = UperEncoder.hexStringFromBytes(encoded); UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); assertEquals("C21070EAB0EC70EF10C166E5D39790",hex); TestRecord result = UperEncoder.decode(encoded, TestRecord.class); assertEquals(result.valueUtf8,record.valueUtf8); assertEquals(result.valueIA5,record.valueIA5); } @Test public void testDecodeUtf8() throws IllegalArgumentException, IllegalAccessException { //"你好�" String original = new String("\u00e4" + "\u00bd" + "\u00a0" + "\u00e5" + "\u00a5" + "\u00bd" + "\u00e5" + "\u0090" + "\u0097"); TestRecord record = new TestRecord(original, "Meier"); byte[] encoded = UperEncoder.encode(record); String hex = UperEncoder.hexStringFromBytes(encoded); UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); assertEquals("C4B0E930AF70A830E970A970AF70E970A430A5C166E5D39790",hex); TestRecord result = UperEncoder.decode(encoded, TestRecord.class); assertEquals(result.valueUtf8,record.valueUtf8); assertEquals(result.valueIA5,record.valueIA5); } }
chs6558/chs6558.github.io
node_modules/styled-icons/crypto/Mco/Mco.esm.js
<reponame>chs6558/chs6558.github.io export * from '@styled-icons/crypto/Mco';
thomasmodeneis/dusk-blockchain
pkg/util/nativeutils/eventbus/multicaster.go
package eventbus import ( "github.com/dusk-network/dusk-blockchain/pkg/p2p/wire/topics" ) // Multicaster allows for a single Listener to listen to multiple topics type Multicaster interface { AddDefaultTopic(topics.Topic) SubscribeDefault(Listener) uint32 } // AddDefaultTopic adds a topic to the default multiListener func (bus *EventBus) AddDefaultTopic(topic topics.Topic) { bus.defaultListener.Add(topic) } // SubscribeDefault subscribes a Listener to the default multiListener. // This is normally useful for implementing a sub-dispatching mechanism // (i.e. bus of busses architecture) func (bus *EventBus) SubscribeDefault(listener Listener) uint32 { return bus.defaultListener.Store(listener) }
myoukaku/bksge
libs/fnd/variant/include/bksge/fnd/variant.hpp
<gh_stars>1-10 /** * @file variant.hpp * * @brief Variant library * * @author myoukaku */ #ifndef BKSGE_FND_VARIANT_HPP #define BKSGE_FND_VARIANT_HPP #include <bksge/fnd/variant/bad_variant_access.hpp> #include <bksge/fnd/variant/config.hpp> #include <bksge/fnd/variant/get.hpp> #include <bksge/fnd/variant/get_if.hpp> #include <bksge/fnd/variant/holds_alternative.hpp> #include <bksge/fnd/variant/monostate.hpp> #include <bksge/fnd/variant/variant.hpp> #include <bksge/fnd/variant/variant_alternative.hpp> #include <bksge/fnd/variant/variant_npos.hpp> #include <bksge/fnd/variant/variant_size.hpp> #include <bksge/fnd/variant/visit.hpp> #endif // BKSGE_FND_VARIANT_HPP
Pixelated-Project/aosp-android-jar
android-31/src/com/android/net/module/util/ConnectivitySettingsUtils.java
<reponame>Pixelated-Project/aosp-android-jar<gh_stars>10-100 /* * Copyright (C) 2021 The Android Open Source Project * * 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 com.android.net.module.util; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.ContentResolver; import android.content.Context; import android.provider.Settings; import android.text.TextUtils; /** * Collection of connectivity settings utilities. * * @hide */ public class ConnectivitySettingsUtils { public static final int PRIVATE_DNS_MODE_OFF = 1; public static final int PRIVATE_DNS_MODE_OPPORTUNISTIC = 2; public static final int PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = 3; public static final String PRIVATE_DNS_DEFAULT_MODE = "private_dns_default_mode"; public static final String PRIVATE_DNS_MODE = "private_dns_mode"; public static final String PRIVATE_DNS_MODE_OFF_STRING = "off"; public static final String PRIVATE_DNS_MODE_OPPORTUNISTIC_STRING = "opportunistic"; public static final String PRIVATE_DNS_MODE_PROVIDER_HOSTNAME_STRING = "hostname"; public static final String PRIVATE_DNS_SPECIFIER = "private_dns_specifier"; /** * Get private DNS mode as string. * * @param mode One of the private DNS values. * @return A string of private DNS mode. */ public static String getPrivateDnsModeAsString(int mode) { switch (mode) { case PRIVATE_DNS_MODE_OFF: return PRIVATE_DNS_MODE_OFF_STRING; case PRIVATE_DNS_MODE_OPPORTUNISTIC: return PRIVATE_DNS_MODE_OPPORTUNISTIC_STRING; case PRIVATE_DNS_MODE_PROVIDER_HOSTNAME: return PRIVATE_DNS_MODE_PROVIDER_HOSTNAME_STRING; default: throw new IllegalArgumentException("Invalid private dns mode: " + mode); } } private static int getPrivateDnsModeAsInt(String mode) { switch (mode) { case "off": return PRIVATE_DNS_MODE_OFF; case "hostname": return PRIVATE_DNS_MODE_PROVIDER_HOSTNAME; case "opportunistic": return PRIVATE_DNS_MODE_OPPORTUNISTIC; default: throw new IllegalArgumentException("Invalid private dns mode: " + mode); } } /** * Get private DNS mode from settings. * * @param context The Context to query the private DNS mode from settings. * @return An integer of private DNS mode. */ public static int getPrivateDnsMode(@NonNull Context context) { final ContentResolver cr = context.getContentResolver(); String mode = Settings.Global.getString(cr, PRIVATE_DNS_MODE); if (TextUtils.isEmpty(mode)) mode = Settings.Global.getString(cr, PRIVATE_DNS_DEFAULT_MODE); // If both PRIVATE_DNS_MODE and PRIVATE_DNS_DEFAULT_MODE are not set, choose // PRIVATE_DNS_MODE_OPPORTUNISTIC as default mode. if (TextUtils.isEmpty(mode)) return PRIVATE_DNS_MODE_OPPORTUNISTIC; return getPrivateDnsModeAsInt(mode); } /** * Set private DNS mode to settings. * * @param context The {@link Context} to set the private DNS mode. * @param mode The private dns mode. This should be one of the PRIVATE_DNS_MODE_* constants. */ public static void setPrivateDnsMode(@NonNull Context context, int mode) { if (!(mode == PRIVATE_DNS_MODE_OFF || mode == PRIVATE_DNS_MODE_OPPORTUNISTIC || mode == PRIVATE_DNS_MODE_PROVIDER_HOSTNAME)) { throw new IllegalArgumentException("Invalid private dns mode: " + mode); } Settings.Global.putString(context.getContentResolver(), PRIVATE_DNS_MODE, getPrivateDnsModeAsString(mode)); } /** * Get specific private dns provider name from {@link Settings}. * * @param context The {@link Context} to query the setting. * @return The specific private dns provider name, or null if no setting value. */ @Nullable public static String getPrivateDnsHostname(@NonNull Context context) { return Settings.Global.getString(context.getContentResolver(), PRIVATE_DNS_SPECIFIER); } /** * Set specific private dns provider name to {@link Settings}. * * @param context The {@link Context} to set the setting. * @param specifier The specific private dns provider name. */ public static void setPrivateDnsHostname(@NonNull Context context, @Nullable String specifier) { Settings.Global.putString(context.getContentResolver(), PRIVATE_DNS_SPECIFIER, specifier); } }
orbiting/publikator-frontend
components/editor/modules/title/ui.js
<reponame>orbiting/publikator-frontend<filename>components/editor/modules/title/ui.js import React from 'react' import { Map } from 'immutable' import { A, Label } from '@project-r/styleguide' import { createPropertyForm } from '../../utils' import MetaForm from '../../utils/MetaForm' export default ({ TYPE, subModules, editorOptions }) => { const isTitleBlock = block => block.type === TYPE || subModules.some(m => m.TYPE === block.type) const Form = createPropertyForm({ isDisabled: ({ value }) => !value.blocks.some(isTitleBlock) })(({ disabled, value, onChange }) => { if (disabled) { return null } const { coverType, dynamicComponentCoverType } = editorOptions return ( <div> {value.blocks .filter(isTitleBlock) .map(block => block.type === TYPE ? block : value.document.getParent(block.key) ) .filter( (block, index, all) => all.indexOf(block) === index && block.type === TYPE ) .map((block, i) => { const onInputChange = subject => key => (_, val) => { onChange( value.change().setNodeByKey(subject.key, { data: val ? subject.data.set(key, val) : subject.data.remove(key) }) ) } const firstNode = value.document.nodes.first() const hasCover = firstNode.type === coverType const hasDynamicCover = firstNode.type === dynamicComponentCoverType const hasAnyCover = hasCover || hasDynamicCover return ( <div key={`titleblock-${i}`}> <Label>Titel</Label> <br /> <MetaForm data={Map({ center: block.data.get('center') || false })} onInputChange={onInputChange(block)} /> {hasAnyCover && ( <A href='#' onClick={e => { e.preventDefault() onChange(value.change().removeNodeByKey(firstNode.key)) }} > Cover entfernen </A> )} {!!coverType && !hasAnyCover && ( <A href='#' onClick={e => { e.preventDefault() onChange( value.change().insertNodeByKey(value.document.key, 0, { kind: 'block', type: coverType }) ) }} > Cover hinzufügen </A> )} <br /> {!!dynamicComponentCoverType && !hasAnyCover && ( <A href='#' onClick={e => { e.preventDefault() onChange( value.change().insertNodeByKey(value.document.key, 0, { kind: 'block', type: dynamicComponentCoverType }) ) }} > Dynamic Component Cover hinzufügen </A> )} </div> ) })} </div> ) }) return { forms: [Form] } }
yairtawil/devextreme-reactive
packages/dx-chart-core/src/index.js
export * from './plugins/scale/computeds'; export * from './plugins/layout-manager/computeds'; export * from './plugins/axis/computeds'; export * from './plugins/series/computeds'; export * from './plugins/stack/computeds'; export * from './plugins/animation/computeds'; export * from './plugins/tooltip/computeds'; export * from './utils/series'; export * from './utils/scale'; export * from './utils/legend'; export * from './utils/event-tracker'; export * from './utils/hover-state'; export * from './constants';
smeng9/Klampt
Python/klampt/math/autodiff/math_ad.py
<gh_stars>100-1000 """Basic math / linear algebra routines. Defines the following AD functions: ================= ============= =================================== Function Derivative Notes ================= ============= =================================== exp 1 log 1 sqrt 1 sin Y cos Y dot Y linear Y Produces :math:`A x` for a fixed A quadratric Y Produces :math:`x^T A x` for a fixed A bilinear Y Produces :math:`x^T A y` for a fixed A ShapedDot Y Reshapes a vector before performing dot norm 1 Standard L2 norm normSquared Y distance 1 Standard L2 norm distanceSquared Y unit N cross 1 interpolate 1 ================= ============= =================================== Module contents ~~~~~~~~~~~~~~~ .. autosummary:: exp log sqrt sin cos dot linear quadratric bilinear ShapedDot norm normSquared distance distanceSquared unit cross interpolate """ import numpy as np from .ad import ADFunctionInterface,function,_scalar,_size class _ADExp(ADFunctionInterface): def __str__(self): return 'exp' def n_args(self): return 1 def n_in(self,arg): return -1 def n_out(self): return -1 def eval(self,x): return np.exp(x) def derivative(self,arg,x): assert arg == 0 diag = np.exp(x) if _scalar(diag): return np.array([[diag]]) else: return np.diag(diag) def jvp(self,arg,darg,x): assert arg == 0 return np.exp(x)*darg class _ADLog(ADFunctionInterface): def __str__(self): return 'log' def n_args(self): return 1 def n_in(self,arg): return -1 def n_out(self): return -1 def eval(self,x): return np.log(x) def derivative(self,arg,x): assert arg == 0 diag = 1.0/x if _scalar(diag): return np.array([[diag]]) else: return np.diag(diag) def jvp(self,arg,darg,x): assert arg == 0 return darg/x class _ADSqrt(ADFunctionInterface): def __str__(self): return 'sqrt' def n_args(self): return 1 def n_in(self,arg): return -1 def n_out(self): return -1 def eval(self,x): return np.sqrt(x) def derivative(self,arg,x): assert arg == 0 return np.diag(0.5/np.sqrt(x)) def jvp(self,arg,darg,x): assert arg == 0 return 0.5*darg/np.sqrt(x) class _ADSin(ADFunctionInterface): def __str__(self): return 'sin' def n_args(self): return 1 def n_in(self,arg): return -1 def n_out(self): return -1 def eval(self,x): return np.sin(x) def derivative(self,arg,x): assert arg == 0 return np.diag(np.cos(x)) def jvp(self,arg,darg,x): assert arg == 0 return np.cos(x)*darg def gen_derivative(self,arg,x): if len(arg) == 1: return self.derivative(arg[0],x) if not _scalar(x): raise NotImplementedError() if len(arg)%2 == 1: base = np.cos(x) else: base = np.sin(x) sign = [1,1,-1,-1][len(arg)%4] return sign*np.array(base) class _ADCos(ADFunctionInterface): def __str__(self): return 'cos' def n_args(self): return 1 def n_in(self,arg): return -1 def n_out(self): return -1 def eval(self,x): return np.cos(x) def derivative(self,arg,x): assert arg == 0 return np.diag(-np.sin(x)) def jvp(self,arg,darg,x): assert arg == 0 return -np.sin(x)*darg def gen_derivative(self,arg,x): if len(arg) == 1: return self.derivative(arg[0],x) if not _scalar(x): raise NotImplementedError() if len(arg)%2 == 1: base = np.sin(x) else: base = np.cos(x) sign = [-1,-1,1,1][len(arg)%4] return sign*np.array(base) class _ADDot(ADFunctionInterface): def __str__(self): return 'dot' def n_args(self): return 2 def n_in(self,arg): return -1 def n_out(self): return 1 def eval(self,x,y): return np.dot(x,y) def derivative(self,arg,x,y): other = y if arg==0 else x return np.asarray(other)[np.newaxis,:] def jvp(self,arg,darg,x,y): other = y if arg==0 else x return np.dot(other,darg) def gen_derivative(self,arg,x,y): if len(arg) == 1: return self.derivative(arg[0],x,y) elif len(arg) == 2: if arg[0] != arg[1]: return np.eye(x.shape[0])[np.newaxis,:,:] return 0 class ShapedDot(ADFunctionInterface): """This function is used to do matrix-vector products, which are by normally not supported by the dot function since all arguments are flattened 1D arrays. This function reshapes either the first or second arguments into a 2D array before calling dot. You must specify the array shape upon instantiation. """ def __init__(self,shape1=None,shape2=None): if shape1 is not None: assert len(shape1)==2,"ShapedDot should only be applied to reshape to matrices" assert shape2 is None,"Can't reshape both vectors" if shape2 is not None: assert len(shape2)==2,"ShapedDot should only be applied to reshape to matrices" assert shape1 is None,"Can't reshape both vectors" assert shape1 is not None or shape2 is not None,"At least one argument should be reshaped" self.shape1 = shape1 self.shape2 = shape2 def n_args(self): return 2 def n_in(self,arg): if arg == 0 and self.shape1 is not None: return self.shape1[0]*self.shape1[1] if arg == 1 and self.shape2 is not None: return self.shape2[0]*self.shape2[1] return -1 def n_out(self): if self.shape1 is not None: return self.shape1[0] if self.shape2 is not None: return self.shape2[1] return 1 def eval(self,x,y): if self.shape1 is not None: return np.dot(x.reshape(self.shape1),y) else: return np.dot(x,y.reshape(self.shape2)) def derivative(self,arg,x,y): if arg == 0: if self.shape1 is not None: assert self.shape1[1] == len(y) raise NotImplementedError() else: return y.reshape(self.shape2).T else: if self.shape2 is not None: assert self.shape2[0] == len(x) raise NotImplementedError() else: return x.reshape(self.shape1) def jvp(self,arg,darg,x,y): if arg == 0: if self.shape1 is not None: assert self.shape1[1] == len(y) return np.dot(darg.reshape(self.shape1),y) else: return np.dot(darg,y.reshape(self.shape2)) else: if self.shape2 is not None: assert self.shape2[0] == len(x) return np.dot(x,darg.reshape(self.shape2)) else: return np.dot(x.reshape(self.shape1),darg) def gen_derivative(self,arg,x,y): if len(arg) == 1: return self.derivative(arg[0],x,y) elif len(arg) == 2: if arg[0] != arg[1]: raise NotImplementedError() else: return 0 class _ADLinear(ADFunctionInterface): def __init__(self,A): self.A = A assert len(A.shape) == 2 def __str__(self): return 'linear' def n_args(self): return 1 def n_in(self,arg): return self.A.shape[1] def n_out(self): return self.A.shape[0] def eval(self,x): return self.A.dot(x) def derivative(self,arg,x): assert arg == 0 return self.A def jvp(self,arg,darg,x): return np.dot(self.A,darg) def gen_derivative(self,arg,x): if len(arg) == 1: return self.derivative(arg[0],x) else: return 0 class _ADQuadratic(ADFunctionInterface): def __init__(self,A): self.A = A assert len(A.shape) == 2 assert A.shape[0] == A.shape[1] def __str__(self): return 'quadratic' def n_args(self): return 1 def n_in(self,arg): return self.A.shape[1] def n_out(self): return 1 def eval(self,x): return np.dot(x,(self.A.dot(x))) def derivative(self,arg,x): assert arg == 0 return (self.A.dot(x) + self.A.T.dot(x))[np.newaxis,:] def jvp(self,arg,darg,x): return np.dot(x,self.A.dot(darg)) + np.dot(darg,self.A.dot(x)) def gen_derivative(self,arg,x): if len(arg) == 1: return self.derivative(arg[0],x) elif len(arg) == 2: return 2*self.A[np.newaxis,:,:] else: return 0 class _ADBilinear(ADFunctionInterface): def __init__(self,A): self.A = A assert len(A.shape) == 2 def __str__(self): return 'bilinear' def n_args(self): return 2 def n_in(self,arg): return self.A.shape[arg] def n_out(self): return 1 def eval(self,x,y): return np.dot(x,(self.A.dot(y))) def derivative(self,arg,x,y): if arg == 0: return self.A.dot(y)[np.newaxis,:] else: return self.A.T.dot(x)[np.newaxis,:] def jvp(self,arg,darg,x,y): if arg == 0: return np.dot(darg,self.A.dot(y)) else: return np.dot(x,self.A.dot(darg)) def gen_derivative(self,arg,x,y): if len(arg) == 1: return self.derivative(arg[0],x,y) elif len(arg) == 2: if arg[0] == arg[1]: return 0 if arg[0] == 0 and arg[1] == 1: return self.A[np.newaxis,:,:] else: return self.A.T[np.newaxis,:,:] else: return 0 class _ADDistanceL2(ADFunctionInterface): def __str__(self): return 'distance' def n_args(self): return 2 def n_in(self,arg): return -1 def n_out(self): return 1 def eval(self,a,b): return np.linalg.norm(a-b) def derivative(self,arg,a,b): if arg==0: return _distance_derivative_a(a,b)[np.newaxis,:] else: return _distance_derivative_a(b,a)[np.newaxis,:] def jvp(self,arg,darg,a,b): if arg==0: return _distance_jvp_a(darg,a,b) else: return _distance_jvp_a(darg,b,a) class _ADDistanceSquared(ADFunctionInterface): def __str__(self): return 'distanceSquared' def n_args(self): return 2 def n_in(self,arg): return -1 def n_out(self): return 1 def eval(self,*args): d = args[0]-args[1] return np.dot(d,d) def derivative(self,arg,a,b): sign = 1 if arg == 0 else -1 return (2*sign)*(a - b).reshape((1,_size(a))) def jvp(self,arg,darg,a,b): sign = 1 if arg == 0 else -1 return (2*sign)*np.dot(a - b,darg) def gen_derivative(self,arg,a,b): if len(arg) == 1: return self.derivative(arg[0],a,b) elif len(arg) == 2: if arg[0] == arg[1]: return 2*np.eye(_size(a))[np.newaxis,:,:] else: return -2*np.eye(_size(a))[np.newaxis,:,:] else: return 0 exp = _ADExp() """Autodiff'ed function comparable to np.exp. First derivative is implemented.""" log = _ADLog() """Autodiff'ed function comparable to np.log. First derivative is implemented.""" sqrt = _ADSqrt() """Autodiff'ed function comparable to np.sqrt. First derivative is implemented.""" sin = _ADSin() """Autodiff'ed function comparable to np.sin. All derivatives are implemented.""" cos = _ADCos() """Autodiff'ed function comparable to np.cos. All derivatives are implemented.""" dot = _ADDot() """Autodiff'ed function comparable to np.dot. All derivatives are implemented.""" def linear(A,x): """Autodiff'ed function comparable to np.dot(A,x). A must be a constant, 2D np.array. x may be an expression.""" return _ADLinear(A)(x) def quadratric(A,x): """Autodiff'ed function comparable to np.dot(x,np.dot(A,x)). A must be a constant, 2D np.array. x may be an expression.""" return _ADQuadratic(A)(x) def bilinear(x,A,y): """Autodiff'ed function comparable to np.dot(x,np.dot(A,y)). A must be a constant, 2D np.array. x and y may be expressions.""" return _ADBilinear(A)(x,y) def _norm_derivative(x): return np.asarray(x)/np.linalg.norm(x) def _norm_jvp(dx,x): return np.dot(x,dx)/np.linalg.norm(x) def _distance_derivative_a(a,b): a = np.asarray(a) b = np.asarray(b) return (a-b) / np.linalg.norm(a-b) def _distance_jvp_a(da,a,b): a = np.asarray(a) b = np.asarray(b) return np.dot(a - b,da) / np.linalg.norm(a-b) norm = function(np.linalg.norm,'norm',[-1],1, derivative=[lambda x:_norm_derivative(x)[np.newaxis,:]], jvp=[_norm_jvp]) """Autodiff'ed function comparable to np.linalg.norm. First derivative is implemented.""" normSquared = function(lambda x:np.dot(x,x),'normSquared',[-1],1, derivative=[lambda x:2*np.asarray(x)[np.newaxis,:]],jvp=[lambda dx,x:2*np.dot(x,dx)],gen_derivative=[lambda x:2*np.eye(len(x))]) """Autodiff'ed function comparable to np.dot(x,x). All derivatives are implemented.""" distance = _ADDistanceL2() """Autodiff'ed function comparable to np.linalg.norm(x-y). First derivative is implemented.""" distanceSquared = _ADDistanceSquared() """Autodiff'ed function comparable to np.dot(x-y,x-y). All derivatives are implemented.""" def _unit(x): n = np.linalg.norm(x) if n > 1e-7: return x/n return n*0 def _unit_jvp(dx,x): n = np.linalg.norm(x) dn = _norm_jvp(dx,x) if n > 1e-7: return dx/n - x*(dn/n**2) return np.linalg.norm(dx) unit = function(_unit,'unit',[-1],-1, jvp=[_unit_jvp]) """Autodiff'ed function comparable to x/norm(x). First derivative is implemented.""" cross = function(np.cross,'cross',[-1,-1],-1, jvp=[(lambda da,a,b:np.cross(da,b)),(lambda db,a,b:np.cross(a,db))], gen_derivative={(0,0):0,(1,1):0}, order=2) """Autodiff'ed function comparable to np.cross(x,y). First derivative is implemented. Some 2nd derivatives are implemented.""" interpolate = function(lambda a,b,u:(1-u)*a+u*b,'interpolate',[-1,-1,1],-1,['a','b','u'], jvp=[(lambda da,a,b,u:(1-u)*da),(lambda db,a,b,u:u*db),(lambda du,a,b,u:du*(b-a))],order=2) """Autodiff'ed function comparable to (1-u)*a+u*b. First derivatives is implemented."""
truthiswill/intellij-community
platform/external-system-rt/src/com/intellij/openapi/externalSystem/rt/execution/ForkedDebuggerConfiguration.java
<gh_stars>1-10 // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.externalSystem.rt.execution; import org.jetbrains.annotations.Nullable; /** * @author Vladislav.Soroka */ public class ForkedDebuggerConfiguration { private final int myForkSocketPort; private final int myDebugPort; private ForkedDebuggerConfiguration(int forkSocketPort, int debugPort) { this.myForkSocketPort = forkSocketPort; this.myDebugPort = debugPort; } public int getForkSocketPort() { return myForkSocketPort; } public int getDebugPort() { return myDebugPort; } @Nullable public static ForkedDebuggerConfiguration parse(@Nullable String jvmAgentSetup) { if (jvmAgentSetup != null && jvmAgentSetup.startsWith(ForkedDebuggerHelper.DEBUG_SETUP_PREFIX)) { int forkSocketIndex = jvmAgentSetup.indexOf(ForkedDebuggerHelper.DEBUG_FORK_SOCKET_PARAM); if (forkSocketIndex > 0) { try { int forkSocketPort = Integer.parseInt(jvmAgentSetup.substring(forkSocketIndex + ForkedDebuggerHelper.DEBUG_FORK_SOCKET_PARAM.length())); int debugPort = Integer.parseInt(jvmAgentSetup.substring(ForkedDebuggerHelper.DEBUG_SETUP_PREFIX.length(), forkSocketIndex - 1)); return new ForkedDebuggerConfiguration(forkSocketPort, debugPort); } catch (NumberFormatException ignore) { } } } return null; } public String getJvmAgentSetup(boolean isJdk9orLater) { return ForkedDebuggerHelper.DEBUG_SETUP_PREFIX + (isJdk9orLater ? "127.0.0.1:" : "") + myDebugPort; } }
julie-sullivan/cellbase
cellbase-client/src/test/java/org/opencb/cellbase/client/rest/TranscriptClientTest.java
/* * Copyright 2015-2020 OpenCB * * 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 org.opencb.cellbase.client.rest; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.opencb.biodata.formats.protein.uniprot.v202003jaxb.Entry; import org.opencb.biodata.models.core.Gene; import org.opencb.biodata.models.core.Transcript; import org.opencb.biodata.models.variant.Variant; import org.opencb.cellbase.client.config.ClientConfiguration; import org.opencb.cellbase.core.result.CellBaseDataResponse; import org.opencb.commons.datastore.core.QueryOptions; import java.io.IOException; import java.util.Collections; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; /** * Created by swaathi on 20/05/16. */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TranscriptClientTest { private CellBaseClient cellBaseClient; public TranscriptClientTest() { } @BeforeAll public void setUp() throws Exception { try { cellBaseClient = new CellBaseClient(ClientConfiguration.load(getClass().getResourceAsStream("/client-configuration-test.yml"))); } catch (IOException e) { throw new RuntimeException(" didn't initialise client correctly "); } } // @Test // public void count() throws Exception { // CellBaseDataResponse<Long> count = cellBaseClient.getTranscriptClient().count(new Query()); // assertEquals(196501, count.firstResult().longValue(), "Number of returned transcripts do not match"); // } // @Test // public void first() throws Exception { // CellBaseDataResponse<Transcript> transcript = cellBaseClient.getTranscriptClient().first(); // assertNotNull(transcript, "First transcript in the collection must be returned"); // } @Test public void get() throws Exception { CellBaseDataResponse<Transcript> transcript = cellBaseClient.getTranscriptClient().get(Collections.singletonList("ENST00000671466.1"), null); assertNotNull(transcript.firstResult(), "This transcript should exist"); // Map<String, Object> params = new HashMap<>(); // params.put("exclude", "xrefs"); // transcript = cellBaseClient.getTranscriptClient().get(Collections.singletonList("ENST00000456328"), params); // assertNull("This transcript should not have xrefs", transcript.firstResult().getXrefs()); } @Test public void getGene() throws Exception { CellBaseDataResponse<Gene> response = cellBaseClient.getTranscriptClient().getGene("ENST00000456328", new QueryOptions()); assertNotNull(response.firstResult(), "It should return the respective gene"); } // @Test public void getVariation() throws Exception { CellBaseDataResponse<Variant> response = cellBaseClient.getTranscriptClient().getVariation("ENST00000456328,ENST00000528762", new QueryOptions(QueryOptions.EXCLUDE, "annotation")); assertNotNull(response.firstResult(), "It should return the variations for the given transcript(s)"); } @Test public void getSequence() throws Exception { CellBaseDataResponse<String> seq = cellBaseClient.getTranscriptClient().getSequence("ENST00000528762", null); assertEquals("TCATCTGGATTATACATATTTCGCAATGAAAGAGAGGAAGAAAAGGAAGCAGCAAAATATGTG" + "GAGGCCCAACAAAAGAGACTAGAAGCCTTATTCACTAAAATTCAGGAGGAATTTGAAGAACATGAAGTTACTTCCTCCACTGAAGTCTTGAACCCCCCAA" + "AGTCATCCATGAGGGTTGGAATCAACTTCTGAAAACACAACAAAACCATATTTACCATCACGTGCACTAACAAGACAGCAAGTTCGTGCTTTGCAAGATGG" + "TGCAGAGCTTTATGAAGCAGTGAAGAATGCAGCAGACCCAGCTTACCTTGAGGGTTATTTCAGTGAAGAGCAGTTAAGAGCCTTGAATAATCACAGGCAAATG" + "TTGAATGATAAGAAACAAGCTCAGATCCAGTTGGAAATTAGGAAGGCCATGGAATCTGCTGAACAAAAGGAACAAGGTTTATCAAGGGATGTCACAACCGTGT" + "GGAAGTTGCGTATTGTAAGCTATTC", seq.firstResult()); } @Test public void getProtein() throws Exception { CellBaseDataResponse<Entry> response = cellBaseClient.getTranscriptClient().getProtein("ENST00000342992", null); assertNotNull(response.firstResult(), "Protein for the given transcript must be returned"); } // @Test // public void getFunctionPrediction() throws Exception { // CellBaseDataResponse<List> response = cellBaseClient.getTranscriptClient().getProteinFunctionPrediction("ENST00000530893", null); // assertNotNull("The function prediction for the given trnascript must be returned", response.firstResult()); // } }
urxp/dRally
___38708h.c
<reponame>urxp/dRally #include "drally.h" extern byte ___1a112ch__VESA101_ACTIVESCREEN_PTR[]; extern byte ___1a0fd8h[]; // RACE RESULTS, PRESS ANY KEY TO CONTINUE BG void ___38708h(void){ dword eax, ebx, ecx, edx, edi, esi, ebp; edx = 0x18810; ebx = 0x46c80; ___38721h: ecx = 0x110; edi = D(___1a112ch__VESA101_ACTIVESCREEN_PTR); esi = D(___1a0fd8h); edi += ebx; esi += edx; edi += 0x162; memcpy(edi, esi, ecx); edx += 0x110; ebx += 0x280; if(edx != 0x19a20) goto ___38721h; return; }
TkkrLab/barsystem
barsystem/src/barsystem/__init__.py
<gh_stars>1-10 __author__ = '<NAME> <<EMAIL>>' __version__ = '1.0.7' def get_version(): return __version__
LastLeaf/LightPalette
core/client/backstage/lib/table_builder.js
<filename>core/client/backstage/lib/table_builder.js // Copyright 2014 LastLeaf, LICENSE: github.lastleaf.me/MIT 'use strict'; lp.tableBuilder = function($div, options, colDefine, addDef){ var idCol = options.idCol || '_id'; var editMore = !!options.editMore; var allowAdd = !!addDef; var allowRemove = !options.noRemove; // events var events = {}; var bind = function(e, func){ if(!events[e]) events[e] = [func]; else events[e].push(func); }; var trigger = function(e){ var a = events[e]; if(!a) return; var args = []; for(var i=1; i<arguments.length; i++) args.push(arguments[i]); for(var i=0; i<a.length; i++) a[i].apply(that, args); }; // build dom structure var _ = lp.tableBuilder.i18n; var $wrapper = $('<div><div class="errors"></div><table cellpadding="0" cellspacing="0" border="0" class="lp_table"><thead></thead><tbody></tbody><tfoot></tfoot></table></div>').appendTo($div); var $table = $wrapper.children('table'); var $thead = $table.children('thead'); var $tbody = $table.children('tbody'); var $tfoot = $table.children('tfoot'); var $theadTr = $('<tr></tr>').appendTo('thead'); var colCount = 0; for(var i=0; i<colDefine.length; i++) { var col = colDefine[i]; if(col.type === 'extra') continue; colCount++; var $th = $('<th></th>').text(col.name).appendTo($theadTr); if(col.type === 'hidden') $th.hide(); } var $navi = $('<tr><th colspan="'+colCount+'" class="lp_table_navi"></th></tr>').appendTo($tfoot).find('th'); if(allowAdd) $('<div class="lp_table_action"><input type="button" class="lp_table_add" value="+"></div>').appendTo($navi); var $page = $('<div class="lp_table_page"></div>').appendTo($navi); // loading control var loading = false; var startLoading = function(){ loading = true; $tbody.fadeTo(200, 0.5); $tfoot.find('input').attr('disabled', true); }; var stopLoading = function(){ loading = false; $tbody.fadeTo(200, 1); $tfoot.find('input').removeAttr('disabled'); }; // input events $tfoot.on('click', '.lp_table_add', function(){ if(loading) return; var $row = $tbody.children('.lp_table_add_row'); if(!$row.length) enterEditMode.call(rowContent(addDef[idCol] || '', addDef).addClass('lp_table_add_row').hide().fadeIn(200)[0]); else $row.focus(); }); var exitEditMode = function(){ if(!this.lpTableEditing) return; var row = this; row.lpTableEditing = false; var $tr = $(row).next().andSelf(); $tr.children('td').each(function(){ $(this).text(this.lpTableData); }); }; var enterEditMode = function(){ if(loading || this.lpTableEditing) return; if(clickHandled) { trigger('click', unescape($(this).attr('rowId'))); return; } var row = this; row.lpTableEditing = true; // put inputs var rowId = unescape($(row).attr('rowId')); var $tr = $(row).next().andSelf(); $tr.children('td').each(function(){ var colId = this.lpTableColId; var type = this.lpTableInput; var placeholder = this.lpTablePlaceholder || ''; if(typeof(type) === 'object') { // select var $input = $('<select name="'+colId+'"></select>'); var defSel = ''; for(var k in type) { $('<option value="'+k+'"></option>').text(type[k]).appendTo($input); if(type[k] === this.lpTableData) defSel = k; } $input.val(defSel); } else if(type === 'password') { // password var $input = $('<input type="password" name="'+colId+'">'); } else if(type === 'hidden') { // text var $input = $('<input type="hidden" name="'+colId+'">').val(this.lpTableData); } else if(type === 'add' && !$tr.hasClass('lp_table_add_row')) { // hidden var $input = $('<span></span>').text(this.lpTableData).add($('<input type="hidden" name="'+colId+'">').val(this.lpTableData)); } else if(type === false) { // not editable var $input = $('<span></span>').text(this.lpTableData); } else { // text var $input = $('<input type="text" name="'+colId+'" placeholder="'+placeholder+'">').val(this.lpTableData); } $(this).html('').append($input); }); // find name-value var getValue = function(){ var vals = {}; $tr.find('[name]').each(function(){ var name = $(this).attr('name').split(/\./g); var cur = vals; while(name.length > 1) { var n = name.shift(); if(typeof(cur[n]) === 'undefined') cur[n] = {}; cur = cur[n]; } cur[name[0]] = $(this).val(); }); return vals; }; // disable inputs var disableInputs = function(cb){ $tr.find('input, select, textarea').attr('disabled', true); $btns.slideUp(200, function(){ if(cb) cb(); }); }; // add buttons var $btns = $('<div class="lp_table_edit_btn"></div>').appendTo($tr.eq(1).children()); if($tr.hasClass('lp_table_add_row')) { $('<input type="button" value="'+_('Add')+'">') .click(function(){ if(loading) return; disableInputs(); trigger('add', getValue()); }) .appendTo($btns); $('<input type="button" value="'+_('Cancel')+'">') .click(function(){ if(loading) return; $tr.fadeOut(200, function(){ $tr.remove(); }); }) .appendTo($btns); } else { if(editMore) var t = _('Details'); else var t = _('Save'); $('<input type="button" value="'+t+'">') .click(function(){ if(loading) return; disableInputs(); trigger('change', getValue(), rowId); }) .appendTo($btns); $('<input type="button" value="'+_('Cancel')+'">') .click(function(){ if(loading) return; disableInputs(function(){ exitEditMode.call(row); }); }) .appendTo($btns); // remove buttons if(allowRemove) { var $removeCancel = $('<input type="button" class="lp_table_edit_btn_right" value="'+_('No, thanks.')+'">') .click(function(){ if(loading) return; $removeConfirm.hide(); $removeCancel.hide(); $remove.fadeIn(200); }) .hide() .appendTo($btns); var $removeConfirm = $('<input type="button" class="lp_table_edit_btn_right" value="'+_('Yes, remove!')+'">') .click(function(){ if(loading) return; disableInputs(); trigger('remove', rowId); }) .hide() .appendTo($btns); var $remove = $('<input type="button" class="lp_table_edit_btn_right" value="'+_('Remove')+'">') .click(function(){ if(loading) return; $remove.hide(); $removeCancel.fadeIn(200); $removeConfirm.fadeIn(200); }) .appendTo($btns); } } }; $tbody.on('click', '.lp_table_row', enterEditMode); // cancel edit var enableAdd = function(){ var $tr = $tbody.children('.lp_table_add_row'); $tr.find('.lp_table_edit_btn').slideDown(200, function(){ $tr.find('input, select, textarea').removeAttr('disabled'); }); }; var enableModify = function(id){ var $tr = $tbody.find('[rowId="'+escape(id)+'"]'); $tr.find('.lp_table_edit_btn').slideDown(200, function(){ $tr.find('input, select, textarea').removeAttr('disabled'); }); }; // data control var rowContent = function(id, data){ var $tr = $tbody.children('[rowId="'+escape(id)+'"]').html(''); if(!$tr.length) $tr = $('<tr class="lp_table_row" rowId="'+escape(id)+'"></tr><tr rowId="'+escape(id)+'" class="lp_table_extra"></tr>').appendTo($tbody); for(var i=0; i<colDefine.length; i++) { var col = colDefine[i]; var d = data; var a = col.id.split(/\./g); while(a.length && d) d = d[a.shift()]; if(typeof(col.input) === 'object') d = col.input[d]; if(col.type === 'extra') { var $td = $('<td colspan="'+colCount+'"></td>').text(d || '').appendTo($tr[1]); } else { var $td = $('<td></td>').text(d || '').appendTo($tr[0]); if(col.type === 'hidden') $td.hide(); } $td.prop('lpTableColId', col.id).prop('lpTableInput', col.input).prop('lpTablePlaceholder', col.placeholder).prop('lpTableData', d || ''); } $tr[0].lpTableEditing = false; return $tr; }; var updateTable = function(dataArray){ $tbody.html(''); for(var i=0; i<dataArray.length; i++) { var data = dataArray[i]; var id = data[idCol]; rowContent(id, data); } }; var setRow = function(id, data){ rowContent(id, data).hide().fadeIn(200); return this; }; var addRow = function(id, data){ $tbody.find('.lp_table_add_row').remove(); return setRow(id, data); }; var removeRow = function(id){ var $tr = $tbody.children('[rowId="'+escape(id)+'"]').fadeOut(200, function(){ $tr.remove(); }); }; // page control var pagePos = 0; var pageTotal = 0; var updateNavi = function(){ $page.html('<input type="button" class="lp_table_prev" value="&lt;"> <input type="text" class="lp_table_page_num"> / '+pageTotal+' <input type="button" class="lp_table_next" value="&gt;">'); $page.find('.lp_table_page_num').val(pagePos+1).css('width', String(pageTotal).length+'em'); }; $page.on('change', '.lp_table_page_num', function(){ var num = Number(this.value); if(num <= 0 || num > pageTotal) { this.value = pagePos+1; } else { pagePos = num-1; updateNavi(); startLoading(); trigger('data', pagePos); } }); $page.on('click', '.lp_table_prev', function(){ if(loading) return; if(pagePos > 0) { pagePos--; updateNavi(); startLoading(); trigger('data', pagePos); } }); $page.on('click', '.lp_table_next', function(){ if(loading) return; if(pagePos < pageTotal - 1) { pagePos++; updateNavi(); startLoading(); trigger('data', pagePos); } }); var set = function(dataArray, pos){ if(typeof(pos) !== 'undefined') { pagePos = pos; updateNavi(); } updateTable(dataArray); stopLoading(); return this; }; var setPage = function(pos, total){ if(typeof(pos) !== 'undefined') pagePos = pos; if(typeof(total) !== 'undefined') pageTotal = total; updateNavi(); startLoading(); setTimeout(function(){ trigger('data', pagePos); }, 0); return this; }; var setTotal = function(total){ pageTotal = total || 0; updateNavi(); return this; }; // event binding funcs var clickHandled = false; var click = function(func){ clickHandled = true; bind('click', func); return this; }; var change = function(func){ bind('change', func); return this; }; var remove = function(func){ bind('remove', func); return this; }; var add = function(func){ bind('add', func); return this; }; var data = function(func){ bind('data', func); return this; }; var that = { setRow: setRow, addRow: addRow, removeRow: removeRow, set: set, setPage: setPage, setTotal: setTotal, enableAdd: enableAdd, enableModify: enableModify, click: click, change: change, remove: remove, add: add, data: data }; return that; }; lp.tableBuilder.i18n = function(str){ return str; };
woblob/Crystal_Symmetry
krysztalki/workDir/tests/test matrices/test_matrices_like_m3_xxx.py
<filename>krysztalki/workDir/tests/test matrices/test_matrices_like_m3_xxx.py import matrices_new_extended as mne import numpy as np import sympy as sp from equality_check import Point x, y, z = sp.symbols("x y z") Point.base_point = np.array([x, y, z, 1]) class Test_Axis_m3_xxx: def test_matrix_m3_xxx(self): expected = Point([ -z, -x, -y, 1]) calculated = Point.calculate(mne._matrix_m3_xxx) assert calculated == expected def test_matrix_m3_xhxx_0h0(self): expected = Point([ -z, 1-x, 1-y, 1]) calculated = Point.calculate(mne._matrix_m3_xhxx_0h0) assert calculated == expected def test_matrix_m3_mhxmhxx_00h(self): expected = Point([ 1-z, -x, 1-y, 1]) calculated = Point.calculate(mne._matrix_m3_mhxmhxx_00h) assert calculated == expected def test_matrix_m3_mhxxx_h00(self): expected = Point([ 1-z, 1-x, -y, 1]) calculated = Point.calculate(mne._matrix_m3_mhxxx_h00) assert calculated == expected def test_matrix_m3_xxx_qqq(self): expected = Point([ 1-z, 1-x, 1-y, 1]) calculated = Point.calculate(mne._matrix_m3_xxx_qqq) assert calculated == expected def test_matrix_m3_xmhxx_3omo3o(self): expected = Point([ 1.5-z, 0.5-x, 0.5-y, 1]) calculated = Point.calculate(mne._matrix_m3_xmhxx_3omo3o) assert calculated == expected def test_matrix_m3_hxhxx_3o3omo(self): expected = Point([ 0.5-z, 1.5-x, 0.5-y, 1]) calculated = Point.calculate(mne._matrix_m3_hxhxx_3o3omo) assert calculated == expected def test_matrix_m3_mhxxx_mo3o3o(self): expected = Point([ 0.5-z, 0.5-x, 1.5-y, 1]) calculated = Point.calculate(mne._matrix_m3_mhxxx_mo3o3o) assert calculated == expected def test_matrix_m3_xxx_3o3o3o(self): expected = Point([ 1.5-z, 1.5-x, 1.5-y, 1]) calculated = Point.calculate(mne._matrix_m3_xxx_3o3o3o) assert calculated == expected
wxq491216/wormhole
LSWormhole/LSWormhole/LSDeviceClient.h
// // LSDeviceClient.h // LSWormhole // 与远程服务器通信Socket类 // Created by xqwang on 2018/9/18. // #import <Foundation/Foundation.h> #import "LSSocketHeader.h" @interface LSDeviceClient : NSObject @property(nonatomic, assign)id<LSSocketDelegate> delegate; //@property(nonatomic, assign)BOOL appOpen; -(BOOL)connectServer; -(void)sendData:(NSData*)data; @end
zhanggh/andr_puligins
library_common/src/com/plugin/commons/helper/DialogUtil.java
package com.plugin.commons.helper; import java.util.HashMap; import java.util.Map; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.Window; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.plugin.R; /** * 常用的弹出框操作 * @author Vinci * @date 2013-8-27 下午04:54:08 * @modifylog */ public class DialogUtil { private static Map<Context,ProgressDialog> pDialogMap = new HashMap<Context,ProgressDialog>(); private static Map<Context,TimeoutProgressDialog> myDialogMap = new HashMap<Context,TimeoutProgressDialog>(); public interface OnAlertSureOnclick { /** * 回调函数 * @author vinci * @date 2013-3-27 下午03:42:08 * @modifylog */ public void onAlertSureOnclick(); } public static ProgressDialog showProgressDialog(Context context){ return showProgressDialog(context,context.getResources().getString(R.string.loading)); } public static ProgressDialog showProgressDialog(Context context,String message){ ProgressDialog pDialog = new ProgressDialog(context); pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); pDialog.setMessage(message == null?context.getResources().getString(R.string.loading):message); pDialog.show(); pDialogMap.put(context, pDialog); return pDialog; } public static void closeProgress(Context context){ if(pDialogMap.containsKey(context)){ ProgressDialog pDialog = pDialogMap.remove(context); if(pDialog!=null){ try{ pDialog.dismiss(); }catch(Exception e){ } } } } public static void showToast(Context context,String msg){ Toast toast = Toast.makeText(context,msg,Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER|Gravity.CENTER, 0, 0); toast.show(); } public static void showCommonAlertDialog(Context context,String msg){ showCommonAlertDialog(context,msg,""); } public static void showCommonAlertDialog(Context context,String msg,String title){ final AlertDialog dlg = new AlertDialog.Builder(context).create(); dlg.setView(LayoutInflater.from(context).inflate(R.layout.dialog_common_alert, null)); final Window window = dlg.getWindow(); dlg.show(); window.setContentView(R.layout.dialog_common_alert); Button sure = (Button) window.findViewById(R.id.btn_sure); final TextView tv_msg = (TextView)window.findViewById(R.id.tv_msg); final TextView tv_title = (TextView)window.findViewById(R.id.tv_title); tv_msg.setText(msg); tv_title.setText(FuncUtil.isEmpty(title)?context.getResources().getString(R.string.tips):title); sure.setVisibility(View.VISIBLE); Button cancel = (Button) window.findViewById(R.id.btn_close); cancel.setVisibility(View.GONE); sure.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dlg.cancel(); } }); } public static void showConfirmAlertDialog(Context context,String msg,String title, final DialogUtil.OnAlertSureOnclick sureListner){ final AlertDialog dlg = new AlertDialog.Builder(context).create(); dlg.setView(LayoutInflater.from(context).inflate(R.layout.dialog_common_alert, null)); final Window window = dlg.getWindow(); dlg.show(); window.setContentView(R.layout.dialog_common_alert); Button sure = (Button) window.findViewById(R.id.btn_sure); final TextView tv_msg = (TextView)window.findViewById(R.id.tv_msg); final TextView tv_title = (TextView)window.findViewById(R.id.tv_title); tv_msg.setText(msg); tv_title.setText(FuncUtil.isEmpty(title)?context.getResources().getString(R.string.tips):title); sure.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //et_name if(sureListner!=null){ sureListner.onAlertSureOnclick(); } dlg.dismiss(); } }); Button cancel = (Button) window.findViewById(R.id.btn_close); cancel.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dlg.cancel(); } }); } public static void showConfirmAlertDialogExt(Context context,String msg,String title, final DialogUtil.OnAlertSureOnclick sureListner,final DialogUtil.OnAlertSureOnclick cancleListner){ final AlertDialog dlg = new AlertDialog.Builder(context).create(); dlg.setView(LayoutInflater.from(context).inflate(R.layout.dialog_common_alert, null)); final Window window = dlg.getWindow(); dlg.show(); window.setContentView(R.layout.dialog_common_alert); Button sure = (Button) window.findViewById(R.id.btn_sure); final TextView tv_msg = (TextView)window.findViewById(R.id.tv_msg); final TextView tv_title = (TextView)window.findViewById(R.id.tv_title); tv_msg.setText(msg); tv_title.setText(FuncUtil.isEmpty(title)?context.getResources().getString(R.string.tips):title); sure.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //et_name if(sureListner!=null){ sureListner.onAlertSureOnclick(); } dlg.dismiss(); } }); Button cancel = (Button) window.findViewById(R.id.btn_close); cancel.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(cancleListner!=null){ cancleListner.onAlertSureOnclick(); } dlg.cancel(); } }); } public static void showConfirmAlertDialog(Activity context,String msg,String title, final DialogUtil.OnAlertSureOnclick sureListner,String cancelStr,String sureStr){ final AlertDialog dlg = new AlertDialog.Builder(context).create(); dlg.setView(context.getLayoutInflater().inflate(R.layout.dialog_common_alert, null)); final Window window = dlg.getWindow(); dlg.show(); window.setContentView(R.layout.dialog_common_alert); Button sure = (Button) window.findViewById(R.id.btn_sure); final TextView tv_msg = (TextView)window.findViewById(R.id.tv_msg); final TextView tv_title = (TextView)window.findViewById(R.id.tv_title); tv_msg.setText(msg); if(!FuncUtil.isEmpty(sureStr)){ sure.setText(sureStr); } tv_title.setText(FuncUtil.isEmpty(title)?context.getResources().getString(R.string.tips):title); sure.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //et_name if(sureListner!=null){ sureListner.onAlertSureOnclick(); } dlg.dismiss(); } }); Button cancel = (Button) window.findViewById(R.id.btn_close); if(!FuncUtil.isEmpty(cancelStr)){ cancel.setText(cancelStr); } cancel.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dlg.cancel(); } }); } public static void showConfirmAlertDialog(Activity context,String msg){ showConfirmAlertDialog(context,msg,"",null); } public static TimeoutProgressDialog showTimeoutProgressDialog(Context context,String message,long timeout,TimeoutProgressDialog.OnTimeOutListener timeOutListener){ TimeoutProgressDialog pDialog = new TimeoutProgressDialog(context); pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); pDialog.setMessage(message == null?"Loading":message); if(timeOutListener!=null){ pDialog.setTimeOut(timeout, timeOutListener); } pDialog.setCancelable(false); pDialog.setCanceledOnTouchOutside(false); pDialog.show(); myDialogMap.put(context, pDialog); return pDialog; } public static void closeTimoutProgress(Context context){ if(myDialogMap.containsKey(context)){ ProgressDialog pDialog = myDialogMap.remove(context); if(pDialog!=null){ try{ pDialog.dismiss(); }catch(Exception e){ } } } } public static AlertDialog inflaterDialog(Context context,int layoutId){ final AlertDialog dlg = new AlertDialog.Builder(context).create(); dlg.setView(LayoutInflater.from(context).inflate(layoutId, null)); dlg.show(); final Window window = dlg.getWindow(); window.setContentView(layoutId); return dlg; } }
newsuk/times-components-native
packages/in-todays-edition/__tests__/shared.js
import InTodaysEdition from "../in-todays-edition"; import Item from "../item"; import TestRenderer from "react-test-renderer"; import React from "react"; import "./serializers-with-all-styles"; jest.mock("@times-components-native/icons", () => ({ IconForwardArrow: "IconForwardArrow", })); import InTodaysEditionData from "../fixtures/in-todays-edition.json"; import ResponsiveContext from "@times-components-native/responsive/src/context"; import { calculateResponsiveContext } from "@times-components-native/responsive/src/calculateResponsiveContext"; const renderInTodaysEdition = (width, orientation) => { const output = TestRenderer.create( <ResponsiveContext.Provider value={calculateResponsiveContext(width, 500, 1)} > <InTodaysEdition items={InTodaysEditionData} onArticlePress={() => null} onLinkPress={() => null} orientation={orientation} /> </ResponsiveContext.Provider>, ); expect(output).toMatchSnapshot(); }; export default () => { describe("InTodaysEdition", () => { describe("portrait", () => { it("768", () => { renderInTodaysEdition(768, "portrait"); }); it("810", () => { renderInTodaysEdition(810, "portrait"); }); it("1024", () => { renderInTodaysEdition(1024, "portrait"); }); }); describe("landscape", () => { it("1024", () => { renderInTodaysEdition(1024, "landscape"); }); it("1080", () => { renderInTodaysEdition(1080, "landscape"); }); it("1112", () => { renderInTodaysEdition(1112, "landscape"); }); it("1366", () => { renderInTodaysEdition(1366, "landscape"); }); }); describe("item", () => { it("onArticlePress is called correctly for item with article link", () => { const onArticlePressMock = jest.fn(); const onLinkPressMock = jest.fn(); const item = TestRenderer.create( <ResponsiveContext.Provider value={calculateResponsiveContext(300, 500, 1)} > <Item item={InTodaysEditionData[0]} onArticlePress={onArticlePressMock} onLinkPress={onLinkPressMock} orientation="portrait" /> </ResponsiveContext.Provider>, ); item.root.findByType(Item).props.onArticlePress(); expect(onArticlePressMock).toHaveBeenCalled(); expect(onLinkPressMock).not.toHaveBeenCalled(); }); it("onLinkPress is called correctly for item with non-article link", () => { const onArticlePressMock = jest.fn(); const onLinkPressMock = jest.fn(); const item = TestRenderer.create( <ResponsiveContext.Provider value={calculateResponsiveContext(300, 500, 1)} > <Item item={InTodaysEditionData[3]} onArticlePress={onArticlePressMock} onLinkPress={onLinkPressMock} orientation="portrait" /> </ResponsiveContext.Provider>, ); item.root.findByType(Item).props.onLinkPress(); expect(onLinkPressMock).toHaveBeenCalled(); expect(onArticlePressMock).not.toHaveBeenCalled(); }); }); }); };
jnthn/intellij-community
java/java-tests/testData/refactoring/wrapReturnValue/anonymous/after/Test.java
<gh_stars>1-10 class Test { public Wrapper foo(int p) { Object o = new Object() { private String myIntFull = ""; public String getIntFull() { return myIntFull; } }; if (p > 0) { return new Wrapper(""); } else { return new Wrapper(""); } } }
kirillrdy/geom
route/route.go
// Package route finds the shortest route between two points along a geometrical // network (e.g., a road network). For now, all network links are assumed to be // bi-directional (e.g., all roads are two-way). package route import ( "fmt" "math" "github.com/ctessum/geom" "github.com/ctessum/geom/index/rtree" "github.com/ctessum/geom/op" "gonum.org/v1/gonum/graph" "gonum.org/v1/gonum/graph/iterator" "gonum.org/v1/gonum/graph/path" ) // A Network is a holder for network data (e.g., a road network) type Network struct { nodes, edges *rtree.Rtree neighbors map[int64]map[int64]*edge nodeMap map[int64]*node maxID int freeMap map[int]struct{} minimizeOption MinimizeOption minimumSpeed float64 // The minimum speed traveled on any link in the network. } // NewNetwork initializes a new Network where m determines how to choose // the shortest route (either by Distance or Time). func NewNetwork(m MinimizeOption) *Network { return &Network{ neighbors: make(map[int64]map[int64]*edge), nodeMap: make(map[int64]*node), maxID: 0, nodes: rtree.NewTree(25, 50), edges: rtree.NewTree(25, 50), minimizeOption: m, minimumSpeed: math.Inf(1), } } // Has returns whether the node exists within the graph. // It is not intended for direct use in this package. func (net Network) Has(n int64) bool { _, ok := net.nodeMap[n] return ok } // Nodes returns all the nodes in the graph. // It is not intended for direct use in this package. func (net Network) Nodes() graph.Nodes { nodes := make([]graph.Node, len(net.nodeMap)) i := 0 for _, n := range net.nodeMap { nodes[i] = n i++ } return iterator.NewOrderedNodes(nodes) } // From returns all nodes that can be reached directly // from the given node. // It is not intended for direct use in this package. func (net Network) From(n int64) graph.Nodes { if !net.Has(n) { return nil } neighbors := make([]graph.Node, len(net.neighbors[n])) i := 0 for id := range net.neighbors[n] { neighbors[i] = net.nodeMap[id] i++ } return iterator.NewOrderedNodes(neighbors) } // HasEdge returns whether an edge exists between // nodes x and y without considering direction. // It is not intended for direct use in this package. func (net Network) HasEdge(x, y int64) bool { _, ok := net.neighbors[x][y] return ok } // Edge returns the edge from u to v if such an edge // exists and nil otherwise. The node v must be directly // reachable from u as defined by the From method. // It is not intended for direct use in this package. func (net Network) Edge(u, v int64) graph.Edge { // We don't need to check if neigh exists because // it's implicit in the neighbors access. if !net.Has(u) { return nil } return net.neighbors[u][v] } func (net Network) Node(id int64) graph.Node { return net.nodeMap[id] } // The math package only provides explicitly sized max // values. This ensures we get the max for the actual // type int. const maxInt int = int(^uint(0) >> 1) func (net *Network) newNodeID() int { if net.maxID != maxInt { net.maxID++ return net.maxID } // I cannot foresee this ever happening, but just in case, we check. if len(net.nodeMap) == maxInt { panic("cannot allocate node: graph too large") } // Should not happen. panic("cannot allocate node id: no free id found") } // Check if there is already a node at this location, and if there // is return that one, otherwise create a new node. func (net *Network) newNode(p geom.Point) *node { if net.nodes.Size() != 0 { nearest := net.nodes.NearestNeighbor(p) if nearest != nil && op.PointEquals(p, nearest.(*node).Point) { return nearest.(*node) } } return &node{ Point: p, id: net.newNodeID(), } } func (net *Network) addNode(n graph.Node) { if _, exists := net.nodeMap[n.ID()]; exists { panic(fmt.Sprintf("route: node ID collision: %d", n.ID())) } net.nodeMap[n.ID()] = n.(*node) net.neighbors[n.ID()] = make(map[int64]*edge) net.nodes.Insert(n.(*node)) } // AddLink adds a new link l (which is a line string) to the Network, where // speed is the speed traveled along the link and should have units that // are compatible with the units of l (for instance, if l is in units of // meters, and speed is in units of m/s, the time results will be in units // of seconds). func (net *Network) AddLink(l geom.LineString, speed float64) { from := net.newNode(l[0]) to := net.newNode(l[len(l)-1]) length := op.Length(l) e := &edge{ LineString: l, start: from, end: to, length: length, speed: speed, time: length / speed, } if e.speed < net.minimumSpeed { net.minimumSpeed = e.speed } fid := from.ID() tid := to.ID() if fid == tid { panic("concrete: adding self edge") } if !net.Has(from.ID()) { net.addNode(from) } if !net.Has(to.ID()) { net.addNode(to) } net.edges.Insert(e) net.neighbors[fid][tid] = e net.neighbors[tid][fid] = e } // Weight returns the weight associated with this edge. // It is not intended for direct use in this package. func (net *Network) Weight(e graph.Edge) float64 { if n, ok := net.neighbors[e.From().ID()]; ok { if we, ok := n[e.To().ID()]; ok { switch net.minimizeOption { // If we're optimizing by time, return use the minimum speed to // calculate the time to ensure the heuristic is less than the actual // value case Time: return we.time case Distance: // If we're optimizing by distance, just return the distance. return we.length default: panic(fmt.Errorf("Invalid MinimizeOption %v", net.minimizeOption)) } } } panic("route: attempting to find an edge that is not in the graph") } type edge struct { geom.LineString start, end *node length, speed, time float64 } // From gives the beginning point of this edge. func (e edge) From() graph.Node { return e.start } // To gives the final point of this edge. func (e edge) To() graph.Node { return e.end } func (e edge) ReversedEdge() graph.Edge { return edge{ LineString: e.LineString, start: e.end, end: e.start, length: e.length, speed: e.speed, time: e.time, } } type node struct { geom.Point id int } func (n node) ID() int64 { return int64(n.id) } // MinimizeOption specifies how the shortest route should be chosen. type MinimizeOption float64 const ( // Distance specifies that we are looking to travel the minimum distance. Distance MinimizeOption = iota // Time specifies that we are looking to travel the minimum time. Time ) // ShortestRoute calculates the shortest route along the network between the // from and to points. It returns the route ("path"), the distance traveled // along the route ("distance"), the time it would take travel along the route // ("time"; this does not count time spent getting to and from the network), // the distance traveled from the starting // point to get to the nearest node (e.g., intersection) along the route // ("startDistance") and the distance traveled to the ending point from // the nearest node along the route ("endDistance"). This function does // not change the Network, so multiple function calls can be run concurrently. func (net Network) ShortestRoute(from, to geom.Point) ( route geom.MultiLineString, distance, time, startDistance, endDistance float64) { startNode := net.nodes.NearestNeighbor(from).(*node) endNode := net.nodes.NearestNeighbor(to).(*node) startDistance = op.Distance(from, startNode.Point) endDistance = op.Distance(to, endNode.Point) shortest, _ := path.AStar(startNode, endNode, net, net.costHeuristic) nodes, _ := shortest.To(endNode.ID()) for i := 0; i < len(nodes)-1; i++ { e, ok := net.neighbors[nodes[i].ID()][nodes[i+1].ID()] if !ok { panic("route: missing edge; this shouldn't happen") } route = append(route, e.LineString) distance += e.length time += e.time } return } // costHeuristic provides a cost estimate this is guaranteed to be equal // to or less than the actual cost. func (net *Network) costHeuristic(x, y graph.Node) float64 { distance := op.Distance(x.(*node).Point, y.(*node).Point) switch net.minimizeOption { // If we're optimizing by time, return use the minimum speed to // calculate the time to ensure the heuristic is less than the actual // value case Time: return distance / net.minimumSpeed case Distance: // If we're optimizing by distance, just return the distance. return distance default: panic(fmt.Errorf("Invalid MinimizeOption %v", net.minimizeOption)) } } // HasEdgeBetween returns whether an edge exists between nodes x and y without // considering direction. func (net Network) HasEdgeBetween(xid, yid int64) bool { if _, ok := net.neighbors[xid][yid]; ok { return true } _, ok := net.neighbors[yid][xid] return ok }
paige-ingram/nwhacks2022
node_modules/@fluentui/react-icons/lib/cjs/components/CallProhibited28Filled.js
<filename>node_modules/@fluentui/react-icons/lib/cjs/components/CallProhibited28Filled.js<gh_stars>0 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const React = require("react"); const wrapIcon_1 = require("../utils/wrapIcon"); const rawSvg = (iconProps) => { const { className, primaryFill } = iconProps; return React.createElement("svg", { width: 28, height: 28, viewBox: "0 0 28 28", xmlns: "http://www.w3.org/2000/svg", className: className }, React.createElement("path", { d: "M24.4 12.1a4.93 4.93 0 001.37-3.16 3.38 3.38 0 00-1.6-3.01C22.2 4.67 19 3.5 14 3.5c-5.02 0-8.2 1.17-10.16 2.43a3.38 3.38 0 00-1.61 3 4.93 4.93 0 001.36 3.17c.55.6 1.34.88 2.14.78l1.75-.22a2.75 2.75 0 002.33-2.06l.45-1.8c.1-.37.3-.58.52-.63.83-.22 2-.34 3.21-.34 1.22 0 2.4.11 3.23.33.21.06.43.27.52.64l.45 1.8a2.75 2.75 0 002.33 2.06l1.75.22c.8.1 1.6-.19 2.14-.78z", fill: primaryFill }), React.createElement("path", { d: "M20.5 19.5a6.5 6.5 0 11-13 0 6.5 6.5 0 0113 0zm-1.5 0c0-1.11-.36-2.14-.97-2.97l-7 7A5 5 0 0019 19.5zm-2.03-4.03a5 5 0 00-7 7l7-7z", fill: primaryFill })); }; const CallProhibited28Filled = wrapIcon_1.default(rawSvg({}), 'CallProhibited28Filled'); exports.default = CallProhibited28Filled;
Mararsh/MyBox
alpha/MyBox/src/main/java/mara/mybox/controller/Data2DTransposeController.java
<reponame>Mararsh/MyBox package mara.mybox.controller; import java.util.ArrayList; import java.util.List; import mara.mybox.dev.MyBoxLog; import mara.mybox.fxml.WindowTools; import mara.mybox.value.Fxmls; import static mara.mybox.value.Languages.message; /** * @Author Mara * @CreateDate 2021-12-9 * @License Apache License Version 2.0 */ public class Data2DTransposeController extends Data2DHandleController { @Override public void handleFileTask() { popError(message("NotSupport")); } @Override public boolean handleRows() { try { super.handleRows(); if (handledData == null) { return false; } int rowsNumber = handledData.size(), columnsNumber = handledData.get(0).size(); List<List<String>> transposed = new ArrayList<>(); for (int r = 0; r < columnsNumber; ++r) { List<String> row = new ArrayList<>(); for (int c = 0; c < rowsNumber; ++c) { row.add(handledData.get(c).get(r)); } transposed.add(row); } handledData = transposed; handledColumns = null; return true; } catch (Exception e) { if (task != null) { task.setError(e.toString()); } MyBoxLog.error(e.toString()); return false; } } /* static */ public static Data2DTransposeController open(ControlData2DEditTable tableController) { try { Data2DTransposeController controller = (Data2DTransposeController) WindowTools.openChildStage( tableController.getMyWindow(), Fxmls.Data2DTransposeFxml, false); controller.setParameters(tableController); return controller; } catch (Exception e) { MyBoxLog.error(e.toString()); return null; } } }
atuldada/checker-framework
checker/src/org/checkerframework/checker/signature/qual/BinaryNameInUnnamedPackage.java
package org.checkerframework.checker.signature.qual; import java.lang.annotation.ElementType; import java.lang.annotation.Target; import org.checkerframework.framework.qual.ImplicitFor; import org.checkerframework.framework.qual.SubtypeOf; /** * Represents a string that is both a {@link BinaryName} and an {@link InternalForm}. The string * represents a class that is in the unnamed package (also known as the default package). * * <p>Example: int Example: int[][] Example: MyClass Example: MyClass[] Example: MyClass$22 Example: * MyClass$22[] * * @checker_framework.manual #signature-checker Signature Checker */ @SubtypeOf({BinaryName.class, InternalForm.class}) @ImplicitFor(stringPatterns = "^[A-Za-z_][A-Za-z_0-9]*(\\$[A-Za-z_0-9]+)*(\\[\\])*$") @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) public @interface BinaryNameInUnnamedPackage {}
stas-vilchik/bdd-ml
data/2690.js
{ log.push(cs[0]); if (this instanceof C) { this.name = cs; } else { return C; } }
dmkelly/mongres
src/statics.js
<filename>src/statics.js const Query = require('./query'); const { castError } = require('./utils'); function count(Model) { return function count(filters = {}) { return find(Model)(filters).count(); }; } function create(Model) { return async function create(data, { transaction } = {}) { const document = new Model(data); let result; try { result = await document.save({ transaction }); } catch (err) { throw castError(err); } return result; }; } function find(Model) { return function find(filters = {}) { return new Query(Model, {}).where(filters); }; } function findOne(Model) { return function findOne(filters = {}) { return new Query(Model, { single: true }).where(filters); }; } function findById(Model) { return function findById(id) { let filters = { id }; if (Model.Parent) { filters = builder => { builder.where({ [`${Model.Parent.tableName}.id`]: id }); }; } return findOne(Model)(filters); }; } function remove(Model) { return async function remove(filters, { transaction } = {}) { if (!filters) { throw await new Error('Model.remove() requires conditions'); } if (Model.Parent) { // Remove corresponding parents and rely on foreign key cascades to remove // children return Model.Parent.remove(builder => { const subquery = new Query(Model, { raw: true, transaction }) .columns([Model.Parent.tableName]) .where(filters).query; builder.where('id', 'in', subquery); }); } const result = await new Query(Model, { operation: Query.operations.DELETE, transaction }).where(filters); return { nModified: result }; }; } function update(Model, instance) { return async function update(filters, changes, { transaction } = {}) { const client = instance.client; let query = client .table(Model.tableName) .update(changes) .where(filters); if (transaction) { query = query.transacting(transaction); } const result = await query; return { nModified: result }; }; } module.exports = { count, create, find, findOne, findById, remove, update };
abramsmatthew/adpllc-test
docassemble_base/docassemble/base/generate_key.py
<gh_stars>0 import string import random import sys r = random.SystemRandom() def random_string(length): return ''.join(r.choice(string.ascii_letters) for i in range(length)) def random_alphanumeric(length): return ''.join(r.choice(string.ascii_uppercase + string.digits) for x in xrange(length)) if __name__ == "__main__": sys.stdout.write(random_string(32))
Nahid-Hassan/fullstack-software-development
courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/tmpl/views.py
<filename>courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/tmpl/views.py from django.shortcuts import render from django.views import View # Create your views here. def simple(request): return render(request, 'tmpl/simple.html') def guess(request) : context = {'zap' : '42' } return render(request, 'tmpl/guess.html', context) def special(request) : context = {'txt' : '<b>bold</b>', 'zap' : '42' } return render(request, 'tmpl/special.html', context) def loop(request) : f = ['Apple', 'Orange', 'Banana', 'Lychee'] n = ['peanut', 'cashew'] x = {'fruits' : f, 'nuts' : n, 'zap' : '42' } return render(request, 'tmpl/loop.html', x) def cond(request) : x = {'guess' : '42' } return render(request, 'tmpl/cond.html', x) def nested(request) : x = {'outer' : { 'inner' : '42' } } return render(request, 'tmpl/nested.html', x) # Call this with a parameter number class GameView(View) : def get(self, request, guess) : x = {'guess' : int(guess) } return render(request, 'tmpl/cond.html', x) # Using inheritance (extend) class Game2View(View) : def get(self, request, guess) : x = {'guess' : int(guess) } return render(request, 'tmpl/cond2.html', x)
gaoht/house
java/classes2/com/unionpay/tsmservice/data/AssociatedCardInfo$1.java
package com.unionpay.tsmservice.data; import android.os.Parcel; import android.os.Parcelable.Creator; final class AssociatedCardInfo$1 implements Parcelable.Creator<AssociatedCardInfo> { public final AssociatedCardInfo createFromParcel(Parcel paramParcel) { return new AssociatedCardInfo(paramParcel); } public final AssociatedCardInfo[] newArray(int paramInt) { return new AssociatedCardInfo[paramInt]; } } /* Location: /Users/gaoht/Downloads/zirom/classes2-dex2jar.jar!/com/unionpay/tsmservice/data/AssociatedCardInfo$1.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
kitaharalab/cmx
src/main_common/jp/crestmuse/cmx/commands/DeviationInstanceExtractor.java
package jp.crestmuse.cmx.commands; import org.xml.sax.SAXException; import java.io.File; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import jp.crestmuse.cmx.filewrappers.CMXFileWrapper; import jp.crestmuse.cmx.filewrappers.DeviationInstanceWrapper; import jp.crestmuse.cmx.filewrappers.MIDIXMLWrapper; import jp.crestmuse.cmx.filewrappers.MusicXMLWrapper; import jp.crestmuse.cmx.filewrappers.SCCXMLWrapper; import jp.crestmuse.cmx.misc.PerformanceMatcher3; public class DeviationInstanceExtractor extends CMXCommand<MusicXMLWrapper, DeviationInstanceWrapper> { //private String targetMusicXMLFileName = null; //private boolean isSMF = false; private MIDIXMLWrapper midixml; private String scoreFileName = "score.mid"; private String midiXmlFileName = "midi.xml"; private String sccXmlFileName = "scc.xml"; private String remadeSmfFileName = "result.mid"; private boolean remakeSMF = false; private int division = 0; private double rowRiscInc = -1; private double colRiscInc = -1; private double ioiWeight = -1; private String pathFileName = null; public String getDestDir() { return super.getDestDir(); } protected boolean setOptionsLocal(String option, String value) { if (option.equals("-smf")){ try { midixml = MIDIXMLWrapper.readSMF(value); } catch (Exception e) { e.printStackTrace(); return false; } return true; } else if(option.equals("-midixml")) { try { midixml = (MIDIXMLWrapper)CMXFileWrapper.readfile(value); } catch (Exception e) { e.printStackTrace(); return false; } return true; } else if (option.equals("-score")) { scoreFileName = value; return true; } else if (option.equals("-midi")) { midiXmlFileName = value; return true; } else if (option.equals("-result")) { remadeSmfFileName = value; return true; } else if (option.equals("-division")) { division = Integer.parseInt(value); return true; } else if(option.equals("-rowrisc")) { rowRiscInc = Double.parseDouble(value); return true; } else if(option.equals("-colrisc")) { colRiscInc = Double.parseDouble(value); return true; } else if(option.equals("-ioi")) { ioiWeight = Double.parseDouble(value); return true; } else if (option.equals("-miss")) { PerformanceMatcher3.MISS_EXTRA_ONSET_DIFF = Double.parseDouble(value); return true; } else if (option.equals("-pathwrite")) { PerformanceMatcher3.DTW_PATH_FILENAME = value; return true; } else if (option.equals("-pathread")) { pathFileName = value; return true; } else { return false; } } protected boolean setBoolOptionsLocal(String option) { if (option.equals("-remakeSMF")) { remakeSMF = true; return true; } return false; } /* protected final FileWrapperCompatible readInputData(String filename) throws IOException, ParserConfigurationException, SAXException, TransformerException { if (isSMF) return MIDIXMLWrapper.readSMF(filename); else return super.readInputData(filename); } protected void preproc() throws InvalidOptionException { if (targetMusicXMLFileName == null) throw new InvalidOptionException("'-target' is not specfied"); } */ protected DeviationInstanceWrapper run(MusicXMLWrapper musicxml) throws IOException,ParserConfigurationException, SAXException,TransformerException { /* java DeviationInstanceExtractor (MusicXML) -smf (SMF) * で実行. * 出力フォルダに注意. * * 1.元の楽譜データをSMFに変換して出力(省略可) * 2.Deviationを抽出して出力 * 3.元の楽譜データに抽出したDeviationを付加してSMFに変換して出力 * 4.元の演奏データと比較 * */ String destdir = getDestDir(); // 元の楽譜データをSMFとして出力 if (remakeSMF) { musicxml.makeDeadpanSCCXML(midixml.ticksPerBeat()).toMIDIXML().writefileAsSMF(new File(destdir, scoreFileName)); } if(rowRiscInc != -1) PerformanceMatcher3.setRowRiscInc(rowRiscInc); if(colRiscInc != -1) PerformanceMatcher3.setColRiscInc(colRiscInc); if(ioiWeight != -1) PerformanceMatcher3.setIoiWeight(ioiWeight); DeviationInstanceWrapper diw; if (pathFileName == null) { if (division == 0) diw = PerformanceMatcher3.extractDeviation(musicxml, midixml); else diw = PerformanceMatcher3.extractDeviation(musicxml,midixml,division); } else { if (division == 0) diw = PerformanceMatcher3.extractDeviation(musicxml, midixml, new File(pathFileName)); else diw = PerformanceMatcher3.extractDeviation(musicxml,midixml,division, new File(pathFileName)); } diw.finalizeDocument(); //setOutputData(diw); if (remakeSMF) { // 出来たDeviationを元の楽譜データに適用して出来たMIDIをMIDIXMLとSMFで出力 SCCXMLWrapper sccxml2 = diw.toSCCXML(midixml.ticksPerBeat()); //sccxml2.write(System.out); sccxml2.writefile(new File(destdir, sccXmlFileName)); MIDIXMLWrapper midixml2 = sccxml2.toMIDIXML(); midixml2.writefile(new File(destdir, midiXmlFileName)); midixml2.writefileAsSMF(new File(destdir, remadeSmfFileName)); } return diw; } public static void main(String[] args) { DeviationInstanceExtractor devExtract = new DeviationInstanceExtractor(); try { devExtract.start(args); } catch (Exception e) { devExtract.showErrorMessage(e); System.exit(1); } } }
Rachel-Shao/openyurt
pkg/yurtctl/util/util_test.go
<gh_stars>100-1000 /* Copyright 2021 The OpenYurt Authors. 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 util import ( "testing" "github.com/stretchr/testify/assert" ) func Test_DownloadFile(t *testing.T) { testCase := []struct { name string url string retry int expected bool }{ {"invalid download url", "http://1.2.3.4", 2, false}, } for _, tc := range testCase { err := DownloadFile(tc.url, "", tc.retry) assert.Equal(t, tc.expected, err == nil) } } func Test_Untar(t *testing.T) { testCase := []struct { name string filePath string expected bool }{ {"invalid tar file", "/tmp", false}, } for _, tc := range testCase { err := Untar(tc.name, "") assert.Equal(t, tc.expected, err == nil) } }
bluebreezecf/login-server
src/main/java/org/cloudfoundry/identity/uaa/login/XFrameOptionsFilter.java
<filename>src/main/java/org/cloudfoundry/identity/uaa/login/XFrameOptionsFilter.java<gh_stars>0 package org.cloudfoundry.identity.uaa.login; import org.springframework.web.filter.OncePerRequestFilter; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; public class XFrameOptionsFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { response.addHeader("X-Frame-Options", "DENY"); filterChain.doFilter(request, response); } }
comprakt/comprakt-fuzz-tests
output/b4f7239beeac42ff823daf344d19c93f.java
class ihigmjy2aybUni { } class bFa { } class ahJt1oyYY3Wh { public int MTJT_tQvv2QL; public void[] HwyELn2 () throws M9DOsBxMtDU { boolean[] Vmg = ( -null[ new G[ 87370682.m].FkXJkllccKj])[ new boolean[ this.zorOvYm_()].ICvy()]; if ( --!W5mk().Yx8TEtn()) -4716487[ -!082296730[ 168726791[ false[ -true.ya10Pbu]]]]; return; int[][] _sWw5; return !new E7Ogw2E4().EfeZQ; void[] dz; boolean HQ7I = -new Hn4hZh().OhhTnE3prN = !u8M5GpeZ22.TiosKMepag_; void vyPc; while ( --!976.mSW) { while ( IBclD().zK) while ( null[ false.u()]) return; } } public static void E1tcrza (String[] exiB4rQZ3t) throws rYI9IFCu2 { int[] bz5oac7cTN6YDK = false.PjXo; kCw2jJ4[][] GA4kUzXVWatk; } } class Y6KeEw { }
MH-Bidhan/TimeToDo
src/models/users/users.model.js
const { hashPassword } = require("../../services/bcrypt"); const users = require("./users.mongo"); async function getUser() { const allUsers = await users.find( {}, { password: 0, createdAt: 0, resetQuotaTime: 0, } ); return allUsers; } async function getUserById(userId) { try { return await users.findById(userId); } catch (err) { return err; } } async function getUserByEmail(email) { try { return await users.findOne({ email }); } catch (err) { return err; } } async function createNewUser(user) { const password = await hashPassword(user.password); try { const createdUser = await users.create({ ...user, password }); return createdUser; } catch (err) { console.log(err.message); } } async function updateUser(userId, updatedUserCred) { try { const user = await users.findByIdAndUpdate(userId, updatedUserCred); if (user) { const updatedUser = await getUserById(userId); return updatedUser; } } catch (err) { console.log(err.message); } } async function deleteUser(userId) { const deletedUser = users.findByIdAndDelete(userId); return deletedUser; } async function changePassword(userId, newPassword) { const user = users.findById(userId); const password = await hashPassword(newPassword); const updateCreds = { ...user._doc, password, }; const updatedUser = await users.findByIdAndUpdate(userId, updateCreds); return updatedUser; } module.exports = { getUser, getUserById, getUserByEmail, createNewUser, updateUser, deleteUser, changePassword, };
mahogano/mahogano
src/main/java/com/mahogano/core/magento/entity/CatalogProductSuperAttribute.java
package com.mahogano.core.magento.entity; public class CatalogProductSuperAttribute { private Integer productSuperAttributeId; private Integer productId; private Integer attributeId; private Integer position; public Integer getProductSuperAttributeId() { return productSuperAttributeId; } public void setProductSuperAttributeId(Integer productSuperAttributeId) { this.productSuperAttributeId = productSuperAttributeId; } public Integer getProductId() { return productId; } public void setProductId(Integer productId) { this.productId = productId; } public Integer getAttributeId() { return attributeId; } public void setAttributeId(Integer attributeId) { this.attributeId = attributeId; } public Integer getPosition() { return position; } public void setPosition(Integer position) { this.position = position; } }
josephspurrier/goreactapp
src/app/api/pkg/router/router.go
<reponame>josephspurrier/goreactapp package router import ( "net/http" "github.com/matryer/way" ) // Mux contains the router. type Mux struct { router *way.Router // CustomServeHTTP is a settable serve function. CustomServeHTTP func(w http.ResponseWriter, r *http.Request, status int, err error) } // New returns an instance of the router. func New() *Mux { return &Mux{ router: way.NewRouter(), CustomServeHTTP: DefaultServeHTTP, } } // Instance returns the router. func (m *Mux) Instance() *way.Router { return m.router } // ServeHTTP routes the incoming http.Request based on method and path // extracting path parameters as it goes. func (m *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request) { m.router.ServeHTTP(w, r) } // Param returns a URL parameter. func (m *Mux) Param(r *http.Request, param string) string { return way.Param(r.Context(), param) }
pitbox46/graaljs-forge
src/main/java/com/oracle/truffle/host/HostLanguageService.java
/* * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * The Universal Permissive License (UPL), Version 1.0 * * Subject to the condition set forth below, permission is hereby granted to any * person obtaining a copy of this software, associated documentation and/or * data (collectively the "Software"), free of charge and under any and all * copyright rights in the Software, and any and all patent rights owned or * freely licensable by each licensor hereunder covering either (i) the * unmodified Software as contributed to or provided by such licensor, or (ii) * the Larger Works (as defined below), to deal in both * * (a) the Software, and * * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if * one is included with the Software each a "Larger Work" to which the Software * is contributed by such licensors), * * without restriction, including without limitation the rights to copy, create * derivative works of, display, perform, and distribute the Software and make, * use, sell, offer for sale, import, export, have made, and have sold the * Software and the Larger Work(s), and to sublicense the foregoing rights on * either these or other terms. * * This license is subject to the following condition: * * The above copyright notice and either this complete permission notice or at a * minimum a reference to the UPL must be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.oracle.truffle.host; import java.lang.reflect.Type; import java.util.function.Predicate; import org.graalvm.polyglot.HostAccess; import org.graalvm.polyglot.impl.AbstractPolyglotImpl; import org.graalvm.polyglot.impl.AbstractPolyglotImpl.AbstractHostService; import org.graalvm.polyglot.proxy.Proxy; import com.oracle.truffle.api.TruffleFile; import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.interop.InteropLibrary; import com.oracle.truffle.api.interop.TruffleObject; import com.oracle.truffle.host.HostAdapterFactory.AdapterResult; import com.oracle.truffle.host.HostMethodDesc.SingleMethod; import com.oracle.truffle.host.HostMethodScope.ScopedObject; import com.oracle.truffle.host.HostObject.GuestToHostCalls; public class HostLanguageService extends AbstractHostService { final HostLanguage language; HostLanguageService(AbstractPolyglotImpl polyglot, HostLanguage language) { super(polyglot); this.language = language; } @Override public void initializeHostContext(Object internalContext, Object receiver, HostAccess hostAccess, ClassLoader cl, Predicate<String> clFilter, boolean hostCLAllowed, boolean hostLookupAllowed) { HostContext context = (HostContext) receiver; ClassLoader useCl = cl; if (useCl == null) { useCl = TruffleOptions.AOT ? null : Thread.currentThread().getContextClassLoader(); } language.initializeHostAccess(hostAccess, useCl); context.initialize(internalContext, useCl, clFilter, hostCLAllowed, hostLookupAllowed); } @Override public void addToHostClassPath(Object receiver, Object truffleFile) { HostContext context = (HostContext) receiver; context.addToHostClasspath((TruffleFile) truffleFile); } @Override public Object findDynamicClass(Object receiver, String classValue) { HostContext context = (HostContext) receiver; Class<?> found = context.findClass(classValue); if (found == null) { return null; } return HostObject.forClass(found, context); } @Override public Object findStaticClass(Object receiver, String classValue) { HostContext context = (HostContext) receiver; Class<?> found = context.findClass(classValue); if (found == null) { return null; } return HostObject.forStaticClass(found, context); } @Override public Object createToHostTypeNode() { return HostToTypeNodeGen.create(); } @SuppressWarnings("unchecked") @Override public <T> T toHostType(Object hostNode, Object hostContext, Object value, Class<T> targetType, Type genericType) { HostContext context = (HostContext) hostContext; HostToTypeNode node = (HostToTypeNode) hostNode; if (node == null) { node = HostToTypeNodeGen.getUncached(); } return (T) node.execute(context, value, targetType, genericType, true); } @Override public Object asHostStaticClass(Object context, Class<?> value) { return HostObject.forStaticClass(value, (HostContext) context); } @Override public Object toGuestValue(Object hostContext, Object hostValue, boolean asValue) { HostContext context = (HostContext) hostContext; assert validHostValue(hostValue, context) : "polyglot unboxing should be a no-op at this point."; if (HostContext.isGuestPrimitive(hostValue)) { return hostValue; } else if (hostValue instanceof Proxy) { return HostProxy.toProxyGuestObject(context, (Proxy) hostValue); } else if (!asValue && hostValue instanceof ScopedObject) { return ((ScopedObject) hostValue).unwrapForGuest(); } else if (hostValue instanceof TruffleObject) { return hostValue; } else if (hostValue instanceof Class) { return HostObject.forClass((Class<?>) hostValue, context); } else if (hostValue == null) { return HostObject.NULL; } else { return HostObject.forObject(hostValue, context); } } private boolean validHostValue(Object hostValue, HostContext context) { Object unboxed = language.access.toGuestValue(context.internalContext, hostValue); return unboxed == hostValue; } @Override public boolean isHostValue(Object value) { Object obj = HostLanguage.unwrapIfScoped(language, value); return (obj instanceof HostObject) || (obj instanceof HostFunction) || (obj instanceof HostException) || (obj instanceof HostProxy); } @Override public Object unboxHostObject(Object hostValue) { return HostObject.valueOf(language, hostValue); } @Override public Object unboxProxyObject(Object hostValue) { return HostProxy.toProxyHostObject(language, hostValue); } @Override public Throwable unboxHostException(Throwable hostValue) { if (hostValue instanceof HostException) { return ((HostException) hostValue).getOriginal(); } return null; } @Override public Object toHostObject(Object hostContext, Object value) { HostContext context = (HostContext) hostContext; return HostObject.forObject(value, context); } @Override public Object asHostDynamicClass(Object context, Class<?> value) { return null; } @Override public boolean isHostException(Throwable exception) { return exception instanceof HostException; } @Override public boolean isHostFunction(Object value) { return HostFunction.isInstance(language, value); } @Override public boolean isHostObject(Object value) { return HostObject.isInstance(language, value); } @Override public boolean isHostProxy(Object value) { return HostProxy.isProxyGuestObject(language, value); } @Override public boolean isHostSymbol(Object obj) { Object o = HostLanguage.unwrapIfScoped(language, obj); if (o instanceof HostObject) { return ((HostObject) o).isStaticClass(); } return false; } @Override public Object createHostAdapter(Object context, Class<?>[] types, Object classOverrides) { HostContext hostContext = (HostContext) context; AdapterResult adapter = HostAdapterFactory.getAdapterClassFor(hostContext, types, classOverrides); if (!adapter.isSuccess()) { throw adapter.throwException(); } return HostObject.forStaticClass(adapter.getAdapterClass(), hostContext); } @Override public RuntimeException toHostException(Object context, Throwable exception) { HostContext hostContext = (HostContext) context; return new HostException(exception, hostContext); } @Override public Object migrateValue(Object targetContext, Object value, Object valueContext) { assert targetContext != valueContext; if (value instanceof TruffleObject) { assert value instanceof TruffleObject; if (HostObject.isInstance(language, value)) { return HostObject.withContext(language, value, (HostContext) HostAccessor.ENGINE.getHostContext(targetContext)); } else if (value instanceof HostProxy) { return HostProxy.withContext(value, (HostContext) HostAccessor.ENGINE.getHostContext(targetContext)); } else if (valueContext == null) { /* * The only way this can happen is with Value.asValue(TruffleObject). If it happens * otherwise, its wrong. */ assert value instanceof TruffleObject; return value; } else { // cannot migrate return null; } } else { assert InteropLibrary.isValidValue(value); return value; } } @Override public Error toHostResourceError(Throwable hostException) { Throwable t = unboxHostException(hostException); if (t instanceof StackOverflowError || t instanceof OutOfMemoryError) { return (Error) t; } return null; } @Override public int findNextGuestToHostStackTraceElement(StackTraceElement firstElement, StackTraceElement[] hostStack, int nextElementIndex) { StackTraceElement element = firstElement; int index = nextElementIndex; while (isGuestToHostReflectiveCall(element) && index < hostStack.length) { element = hostStack[index++]; } if (isGuestToHostCallFromHostInterop(element)) { return index - nextElementIndex; } else { return -1; } } @Override public void pin(Object receiver) { HostMethodScope.pin(receiver); } private static boolean isGuestToHostCallFromHostInterop(StackTraceElement element) { assert assertClassNameUnchanged(GuestToHostCalls.class, "com.oracle.truffle.host.HostObject$GuestToHostCalls"); assert assertClassNameUnchanged(GuestToHostCodeCache.class, "com.oracle.truffle.host.GuestToHostCodeCache"); assert assertClassNameUnchanged(SingleMethod.class, "com.oracle.truffle.host.HostMethodDesc$SingleMethod"); switch (element.getClassName()) { case "com.oracle.truffle.host.HostMethodDesc$SingleMethod$MHBase": return element.getMethodName().equals("invokeHandle"); case "com.oracle.truffle.host.HostMethodDesc$SingleMethod$MethodReflectImpl": return element.getMethodName().equals("reflectInvoke"); case "com.oracle.truffle.host.HostObject$GuestToHostCalls": return true; default: return element.getClassName().startsWith("com.oracle.truffle.host.GuestToHostCodeCache$") && element.getMethodName().equals("executeImpl"); } } private static boolean assertClassNameUnchanged(Class<?> c, String name) { if (c.getName().equals(name)) { return true; } throw new AssertionError("Class name is outdated. Expected " + name + " but got " + c.getName()); } private static boolean isGuestToHostReflectiveCall(StackTraceElement element) { switch (element.getClassName()) { case "sun.reflect.NativeMethodAccessorImpl": case "sun.reflect.DelegatingMethodAccessorImpl": case "jdk.internal.reflect.NativeMethodAccessorImpl": case "jdk.internal.reflect.DelegatingMethodAccessorImpl": case "java.lang.reflect.Method": return element.getMethodName().startsWith("invoke"); default: return false; } } }
mnote/Aspose.Cells-for-Java
Examples/src/AsposeCellsExamples/Workbook/CreateSharedWorkbook.java
<filename>Examples/src/AsposeCellsExamples/Workbook/CreateSharedWorkbook.java package AsposeCellsExamples.Workbook; import com.aspose.cells.*; import AsposeCellsExamples.Utils; public class CreateSharedWorkbook { static String srcDir = Utils.Get_SourceDirectory(); static String outDir = Utils.Get_OutputDirectory(); public static void main(String[] args) throws Exception { System.out.println("Aspose.Cells for Java Version: " + CellsHelper.getVersion()); //Create Workbook object Workbook wb = new Workbook(); //Share the Workbook wb.getSettings().setShared(true); //Save the Shared Workbook wb.save(outDir + "outputSharedWorkbook.xlsx"); // Print the message System.out.println("CreateSharedWorkbook executed successfully."); } }
PesterevViacheslav/vpesterev
chapter_006/src/test/java/ru/job4j/search/TestSearchFiles.java
<reponame>PesterevViacheslav/vpesterev package ru.job4j.search; import org.junit.Test; import java.io.*; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; /** * Class TestSearchFiles - Автотест архивирования проекта. Решение задач уровня Junior. Части 002. Ввод-Вывод. * 6.3.1. Поиск файлов по критерию[#131907]. * * @author <NAME> (<EMAIL>) * @since 22.03.2019 * @version 1 */ public class TestSearchFiles { private final String fileSeparator = System.getProperty("file.separator"); private final String dir = System.getProperty("java.io.tmpdir"); /** * Method deleteFile. Удаление дерева каталогов с файлами. * @param root Корневой каталог */ public static void deleteFile(File root) { if (root.isDirectory()) { for (File sub : root.listFiles()) { deleteFile(sub); } } root.delete(); } public List<String> getSearchResult() throws FileNotFoundException { return new BufferedReader(new InputStreamReader(new FileInputStream(dir + this.fileSeparator + "result.txt"), StandardCharsets.UTF_8)) .lines() .flatMap((p) -> Arrays.asList(p.split(" ")).stream()) .collect(Collectors.toList()); } /** * Тест поиска. */ /* @Test public void testFileSearch() throws Exception { System.out.println(dir); List<String> result = new ArrayList<>(); File rootDir = new File(String.join(this.fileSeparator, dir, "search_root")); rootDir.mkdirs(); File folder01 = new File(String.join(this.fileSeparator, rootDir.getPath(), "folder01")); folder01.mkdirs(); File file011 = new File(String.join(this.fileSeparator, folder01.getPath(), "file011.txt")); file011.createNewFile(); File file012 = new File(String.join(this.fileSeparator, folder01.getPath(), "file012.java")); file012.createNewFile(); File folder013 = new File(String.join(this.fileSeparator, folder01.getPath(), "folder013")); folder013.mkdirs(); File file021 = new File(String.join(this.fileSeparator, folder013.getPath(), "file021.txt")); file021.createNewFile(); Args args = new Args(String.join(this.fileSeparator, dir, "search_root"), ".txt", "m", "result.txt"); SearchFiles searchFiles = new SearchFiles(args); searchFiles.search(); result.add("file011.txt"); result.add("file021.txt"); assertThat(Arrays.asList(result), is(Arrays.asList(getSearchResult()))); result.remove(1); Args args2 = new Args(String.join("", dir, this.fileSeparator, "search_root"), "file011.txt", "f", "result.txt"); SearchFiles searchFiles2 = new SearchFiles(args2); searchFiles2.search(); assertThat(Arrays.asList(result), is(Arrays.asList(getSearchResult()))); Args args3 = new Args(String.join("", dir, this.fileSeparator, "search_root"), "..le011.txt", "r", "result.txt"); SearchFiles searchFiles3 = new SearchFiles(args3); searchFiles3.search(); assertThat(Arrays.asList(result), is(Arrays.asList(getSearchResult()))); deleteFile(rootDir); } */ }
mondo-mob/spring-boot-gae
src/test/java/org/springframework/contrib/gae/objectify/repository/StringSaveRepositoryTest.java
package org.springframework.contrib.gae.objectify.repository; import com.googlecode.objectify.SaveException; import org.assertj.core.api.SoftAssertions; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.contrib.gae.objectify.TestStringEntity; import java.util.Arrays; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; @SuppressWarnings("ConstantConditions") public class StringSaveRepositoryTest extends AbstractStringRepositoryTest { @Autowired private SaveRepository<TestStringEntity, String> repository; @Test public void save() { TestStringEntity saved = repository.save(new TestStringEntity("my-id").setName("name")); TestStringEntity loaded = load("my-id"); assertThat(loaded.getId()).isEqualTo(saved.getId()); assertThat(loaded.getName()).isEqualTo(saved.getName()); } @Test public void save_willThrowException_whenInputIsNull() { thrown.expect(NullPointerException.class); repository.save((TestStringEntity) null); } @Test public void save_willThrowException_whenInputHasNoId() { thrown.expect(SaveException.class); thrown.expectMessage("Cannot save an entity with a null String @Id"); repository.save(new TestStringEntity(null)); } @Test public void saveCollection() { List<TestStringEntity> saved = repository.save( Arrays.asList(fixture.get(3)) ); assertThat(saved).hasSize(3); verifyTestEntityCollectionSaved(); } @Test public void saveCollection_willThrowException_whenInputContainsEntityWithoutId() { thrown.expect(SaveException.class); thrown.expectMessage("Cannot save an entity with a null String @Id"); repository.save( Arrays.asList( new TestStringEntity("id1"), new TestStringEntity(null), new TestStringEntity("id3") ) ); } @Test public void saveVarargs() { List<TestStringEntity> saved = repository.save( fixture.get(3) ); assertThat(saved).hasSize(3); verifyTestEntityCollectionSaved(); } @Test public void saveVarargs_willThrowException_whenInputContainsEntityWithoutId() { thrown.expect(SaveException.class); thrown.expectMessage("Cannot save an entity with a null String @Id"); repository.save( new TestStringEntity("id1"), new TestStringEntity(null), new TestStringEntity("id3") ); } @SuppressWarnings("Duplicates") protected void verifyTestEntityCollectionSaved() { SoftAssertions softly = new SoftAssertions(); TestStringEntity loaded1 = load("id1"); softly.assertThat(loaded1.getId()).isEqualTo("id1"); softly.assertThat(loaded1.getName()).isEqualTo("entity1"); TestStringEntity loaded2 = load("id2"); softly.assertThat(loaded2.getId()).isEqualTo("id2"); softly.assertThat(loaded2.getName()).isEqualTo("entity2"); TestStringEntity loaded3 = load("id3"); softly.assertThat(loaded3.getId()).isEqualTo("id3"); softly.assertThat(loaded3.getName()).isEqualTo("entity3"); softly.assertAll(); } }
nikolay-kostov/ngtrello
src/app/guest/directives/header/header.guest.directive.js
import template from './header.guest.tpl.html'; headerGuest.$inject = []; export default function headerGuest() { var directive = { restrict: 'E', template: template, link: link, controller: headerController, controllerAs: 'vm', scope: true }; headerController.$inject = ['$scope']; function headerController ($scope) { var vm = this; // vm.title = $scope.title; } return directive; function link() {} }
Rukeith/example-C
Fig5.14.c
<reponame>Rukeith/example-C #include<stdio.h> long factorial( long number ); int main( void ) { int i; for ( i = 0; i <= 10; i++ ) { printf( "%2d! = %ld\n", i, factorial( i ) ); } return 0; } long factorial( long number ) { if ( number <= 1 ) { return 1; } else { return ( number * factorial( number - 1 ) ); } }
1757WestwoodRobotics/2022-RapidReact
commands/climber/moveclimberstonextrungcaptureposition.py
<filename>commands/climber/moveclimberstonextrungcaptureposition.py from commands2 import CommandBase from subsystems.climbers.leftclimbersubsystem import LeftClimber from subsystems.climbers.rightclimbersubsystem import RightClimber import constants class MoveLeftClimberToNextRungCapturePosition(CommandBase): def __init__(self, climber: LeftClimber) -> None: CommandBase.__init__(self) self.setName(__class__.__name__) self.climber = climber self.addRequirements([self.climber]) def initialize(self) -> None: self.climber.leftClimber.deactivateBrake() def execute(self) -> None: self.climber.leftClimber.extendPiston() self.climber.leftClimber.setClimberTiltedExtension() def end(self, _interrupted: bool) -> None: self.climber.leftClimber.climberMotor.neutralOutput() self.climber.leftClimber.activateBrake() # pylint: disable-next=no-self-use def isFinished(self) -> bool: return ( abs( ( self.climber.leftClimber.climberMotor.getSelectedSensorPosition() - constants.kClimberTiltedExtensionMax ) ) < constants.kClimberExtensionPositionThreshold ) class MoveRightClimberToNextRungCapturePosition(CommandBase): def __init__(self, climber: RightClimber) -> None: CommandBase.__init__(self) self.setName(__class__.__name__) self.climber = climber self.addRequirements([self.climber]) def initialize(self) -> None: self.climber.rightClimber.deactivateBrake() def execute(self) -> None: self.climber.rightClimber.extendPiston() self.climber.rightClimber.setClimberTiltedExtension() def end(self, _interrupted: bool) -> None: self.climber.rightClimber.climberMotor.neutralOutput() self.climber.rightClimber.activateBrake() # pylint: disable-next=no-self-use def isFinished(self) -> bool: return ( abs( ( self.climber.rightClimber.climberMotor.getSelectedSensorPosition() - constants.kClimberTiltedExtensionMax ) ) < constants.kClimberExtensionPositionThreshold )
BrandwatchLtd/plottable
quicktests/js/domain_adjustment_algorithm.js
function makeData() { "use strict"; return makeRandomData(50); } function run(div, data, Plottable) { "use strict"; var svg = div.append("svg").attr("height", 500); var ds = new Plottable.Dataset(data); var xScale = new Plottable.Scale.Linear(); var yScale = new Plottable.Scale.Linear(); var xAxis = new Plottable.Axis.Numeric(xScale, "bottom"); var yAxis = new Plottable.Axis.Numeric(yScale, "left"); var linePlot = new Plottable.Plot.Line(xScale, yScale).automaticallyAdjustYScaleOverVisiblePoints(true).addDataset(ds); var focusXLabel = new Plottable.Component.Label("focus X"); var basicTable = new Plottable.Component.Table([ [yAxis, linePlot], [focusXLabel, xAxis] ]); basicTable.renderTo(svg); function xFocus(){ xScale.domain([0.25, 0.5]); } focusXLabel.registerInteraction( new Plottable.Interaction.Click().callback(xFocus) ); }
stevek-ngdata/lilyproject
cr/repository/api/src/main/java/org/lilyproject/repository/api/RecordType.java
<reponame>stevek-ngdata/lilyproject<gh_stars>10-100 /* * Copyright 2010 Outerthought bvba * * 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 org.lilyproject.repository.api; import java.util.Collection; import java.util.Map; /** * A record type describes the schema to be followed by a {@link Record}. * * <p>Record types are managed via the {@link TypeManager}. To instantiate a RecordType use * {@link TypeManager#newRecordType(QName)} TypeManager.newRecordType}. As all entities within this API, * record types are dumb data objects. * * <p>A record type consists of: * * <ul> * <li>a list of field types, associated via {@link FieldTypeEntry} which defines properties specific to the use * of a field type within this record type. * <li>a list of supertypes, these are references to other record types that are parent types for this record type. * </ul> * * <p>Record types are versioned: upon each update, a new version of the record type is created. Record store a * pointer to the particular version of a record type that was used when creating/updating a record type. The references * to the supertype record types are also to specific versions. * * <p>A record type has two unique identifiers: * <ul> * <li>a system-generated id, immutable after creation of the record type * <li>a name in the form of a {@link QName qualified (namespaced) name}, which is mutable after creation of the record * type. Changing the name of a record type affects all versions of the record type (the name is a non-versioned * property of the record type). * </ul> */ public interface RecordType { /** * Sets the id. * * <p>Even though IDs are system-generated, you might need to set them on the record type e.g. to construct * a record type to pass to the {@link TypeManager#updateRecordType(RecordType)}. */ void setId(SchemaId id); /** * The id is unique, immutable and system-generated. */ SchemaId getId(); void setName(QName name); /** * The name is unique, user-provided but can be changed after initial creation of the record type. */ QName getName(); void setVersion(Long version); Long getVersion(); /** * Adds a field type entry. A field type entry can be instantiated via {@link TypeManager#newFieldTypeEntry(String, boolean)}. */ void addFieldTypeEntry(FieldTypeEntry fieldTypeEntry); /** * A shortcut for adding a field type entry without having to instantiate it yourself. */ FieldTypeEntry addFieldTypeEntry(SchemaId fieldTypeId, boolean mandatory); /** * * @return null if there is not field type entry for this field type */ FieldTypeEntry getFieldTypeEntry(SchemaId fieldTypeId); void removeFieldTypeEntry(SchemaId fieldTypeId); Collection<FieldTypeEntry> getFieldTypeEntries(); /** * Adds a super type to the record type. * * <p>When no version is given, the latest recordType version will be filled in. */ void addSupertype(SchemaId recordTypeId, Long recordTypeVersion); /** * Same as {@link #addSupertype(SchemaId, Long)}} but with null for the recordTypeVersion. */ void addSupertype(SchemaId recordTypeId); /** * Removes a supertype from the recordType. */ void removeSupertype(SchemaId recordTypeId); /** * Returns a map of the recordTypeIds and versions of the supertypes of the RecordType. */ Map<SchemaId, Long> getSupertypes(); /** * Adds a mixin to the record type. * When no version is given, the latest recordType version will be filled in. * * @deprecated mixins are renamed to supertypes in 2.2, use {@link #addSupertype(SchemaId, Long)} instead. */ void addMixin(SchemaId recordTypeId, Long recordTypeVersion); /** * Same as {@link #addMixin(SchemaId, Long)} but with null for the recordTypeVersion. * * @deprecated mixins are renamed to supertypes in 2.2, use {@link #addSupertype(SchemaId)} instead */ void addMixin(SchemaId recordTypeId); /** * Removes a mixin from the recordType. * * @deprecated mixins are renamed to supertypes in 2.2, use {@link #removeSupertype(SchemaId)} instead. */ void removeMixin(SchemaId recordTypeId); /** * Returns a map of the recordTypeIds and versions of the mixins of the RecordType. * * @deprecated mixins are renamed to supertypes in 2.2, use {@link #getSupertypes()} instead. */ Map<SchemaId, Long> getMixins(); RecordType clone(); boolean equals(Object obj); }
keera-studios/hsQt
qws/src/qtc_script_meta.cpp
///////////////////////////////////////////////////////////////////////////// // // File : qtc_script_meta.cpp // Copyright : (c) <NAME> 2010 // Project : qtHaskell // Version : 1.1.4 // Modified : 2010-09-02 17:01:54 // // Warning : this file is machine generated - do not modify. // ///////////////////////////////////////////////////////////////////////////// #include <QPointer> #include <wchar.h> #include <qtc_wrp_core.h> #include <qtc_wrp_gui.h> #include <qtc_wrp_opengl.h> #include <qtc_wrp_script.h> #include <qtc_subclass.h> #include <DhOther_core.h> #include <DhAutohead_core.h> #include <DhOther_gui.h> #include <DhAutohead_gui.h> #include <DhOther_opengl.h> #include <DhAutohead_opengl.h> Q_DECLARE_METATYPE(QAbstractButton*); Q_DECLARE_METATYPE(QAbstractItemView*); Q_DECLARE_METATYPE(QAbstractScrollArea*); Q_DECLARE_METATYPE(QAbstractSlider*); Q_DECLARE_METATYPE(QAbstractSpinBox*); Q_DECLARE_METATYPE(QAbstractTableModel*); Q_DECLARE_METATYPE(QAbstractTextDocumentLayout*); Q_DECLARE_METATYPE(QAction*); Q_DECLARE_METATYPE(QActionGroup*); Q_DECLARE_METATYPE(QApplication*); Q_DECLARE_METATYPE(QBoxLayout*); Q_DECLARE_METATYPE(QBrush*); Q_DECLARE_METATYPE(QButtonGroup*); Q_DECLARE_METATYPE(QCalendarWidget*); Q_DECLARE_METATYPE(QCheckBox*); Q_DECLARE_METATYPE(QColor*); Q_DECLARE_METATYPE(QComboBox*); Q_DECLARE_METATYPE(QDial*); Q_DECLARE_METATYPE(QDialog*); Q_DECLARE_METATYPE(QDialogButtonBox*); Q_DECLARE_METATYPE(QDockWidget*); Q_DECLARE_METATYPE(QDoubleSpinBox*); Q_DECLARE_METATYPE(QErrorMessage*); Q_DECLARE_METATYPE(QFocusFrame*); Q_DECLARE_METATYPE(QFont*); Q_DECLARE_METATYPE(QFontComboBox*); Q_DECLARE_METATYPE(QGLColormap*); Q_DECLARE_METATYPE(QGLContext*); Q_DECLARE_METATYPE(QGLFormat*); Q_DECLARE_METATYPE(QGLFramebufferObject*); Q_DECLARE_METATYPE(QGLPixelBuffer*); Q_DECLARE_METATYPE(QGLWidget*); Q_DECLARE_METATYPE(QGridLayout*); Q_DECLARE_METATYPE(QGroupBox*); Q_DECLARE_METATYPE(QHBoxLayout*); Q_DECLARE_METATYPE(QHeaderView*); Q_DECLARE_METATYPE(QIODevice*); Q_DECLARE_METATYPE(QKeyEvent*); Q_DECLARE_METATYPE(QLCDNumber*); Q_DECLARE_METATYPE(QLabel*); Q_DECLARE_METATYPE(QLayout*); Q_DECLARE_METATYPE(QLineEdit*); Q_DECLARE_METATYPE(QMenu*); Q_DECLARE_METATYPE(QMenuBar*); Q_DECLARE_METATYPE(QMessageBox*); Q_DECLARE_METATYPE(QMouseEvent*); Q_DECLARE_METATYPE(QPaintEvent*); Q_DECLARE_METATYPE(QPainter*); Q_DECLARE_METATYPE(QPainterPath*); Q_DECLARE_METATYPE(QPalette*); Q_DECLARE_METATYPE(QPen*); Q_DECLARE_METATYPE(QPixmap*); Q_DECLARE_METATYPE(QPixmapCache*); Q_DECLARE_METATYPE(QProgressBar*); Q_DECLARE_METATYPE(QProgressDialog*); Q_DECLARE_METATYPE(QPushButton*); Q_DECLARE_METATYPE(QResizeEvent*); Q_DECLARE_METATYPE(QRubberBand*); Q_DECLARE_METATYPE(QScrollArea*); Q_DECLARE_METATYPE(QScrollBar*); Q_DECLARE_METATYPE(QSlider*); Q_DECLARE_METATYPE(QSpinBox*); Q_DECLARE_METATYPE(QTabBar*); Q_DECLARE_METATYPE(QTabWidget*); Q_DECLARE_METATYPE(QTextBrowser*); Q_DECLARE_METATYPE(QTextCharFormat*); Q_DECLARE_METATYPE(QTextCursor*); Q_DECLARE_METATYPE(QTextDocument*); Q_DECLARE_METATYPE(QTextEdit*); Q_DECLARE_METATYPE(QTextFormat*); Q_DECLARE_METATYPE(QTextStream*); Q_DECLARE_METATYPE(QVBoxLayout*); Q_DECLARE_METATYPE(QWidget*); QHash<QString, int> * qsn_hash_init() { QHash<QString, int> * tqh = new QHash<QString, int>(); tqh->insert("<QBrush*>", 0); tqh->insert("<QColor*>", 1); tqh->insert("<QFont*>", 2); tqh->insert("<QGLColormap*>", 3); tqh->insert("<QGLContext*>", 4); tqh->insert("<QGLFormat*>", 5); tqh->insert("<QGLFramebufferObject*>", 6); tqh->insert("<QGLPixelBuffer*>", 7); tqh->insert("<QKeyEvent*>", 8); tqh->insert("<QMouseEvent*>", 9); tqh->insert("<QPaintEvent*>", 10); tqh->insert("<QPainter*>", 11); tqh->insert("<QPainterPath*>", 12); tqh->insert("<QPalette*>", 13); tqh->insert("<QPen*>", 14); tqh->insert("<QPixmap*>", 15); tqh->insert("<QPixmapCache*>", 16); tqh->insert("<QResizeEvent*>", 17); tqh->insert("<QTextCharFormat*>", 18); tqh->insert("<QTextCursor*>", 19); tqh->insert("<QTextFormat*>", 20); tqh->insert("<QTextStream*>", 21); return tqh; } QHash<QString, int> * qsn_hash = qsn_hash_init(); QHash<QString, int> * qso_hash_init() { QHash<QString, int> * tqh = new QHash<QString, int>(); tqh->insert("<QAbstractButton*>", 0); tqh->insert("<QAbstractItemView*>", 1); tqh->insert("<QAbstractScrollArea*>", 2); tqh->insert("<QAbstractSlider*>", 3); tqh->insert("<QAbstractSpinBox*>", 4); tqh->insert("<QAbstractTableModel*>", 5); tqh->insert("<QAbstractTextDocumentLayout*>", 6); tqh->insert("<QAction*>", 7); tqh->insert("<QActionGroup*>", 8); tqh->insert("<QApplication*>", 9); tqh->insert("<QBoxLayout*>", 10); tqh->insert("<QButtonGroup*>", 11); tqh->insert("<QCalendarWidget*>", 12); tqh->insert("<QCheckBox*>", 13); tqh->insert("<QComboBox*>", 14); tqh->insert("<QDial*>", 15); tqh->insert("<QDialog*>", 16); tqh->insert("<QDialogButtonBox*>", 17); tqh->insert("<QDockWidget*>", 18); tqh->insert("<QDoubleSpinBox*>", 19); tqh->insert("<QErrorMessage*>", 20); tqh->insert("<QFocusFrame*>", 21); tqh->insert("<QFontComboBox*>", 22); tqh->insert("<QGLWidget*>", 23); tqh->insert("<QGridLayout*>", 24); tqh->insert("<QGroupBox*>", 25); tqh->insert("<QHBoxLayout*>", 26); tqh->insert("<QHeaderView*>", 27); tqh->insert("<QIODevice*>", 28); tqh->insert("<QLCDNumber*>", 29); tqh->insert("<QLabel*>", 30); tqh->insert("<QLayout*>", 31); tqh->insert("<QLineEdit*>", 32); tqh->insert("<QMenu*>", 33); tqh->insert("<QMenuBar*>", 34); tqh->insert("<QMessageBox*>", 35); tqh->insert("<QProgressBar*>", 36); tqh->insert("<QProgressDialog*>", 37); tqh->insert("<QPushButton*>", 38); tqh->insert("<QRubberBand*>", 39); tqh->insert("<QScrollArea*>", 40); tqh->insert("<QScrollBar*>", 41); tqh->insert("<QSlider*>", 42); tqh->insert("<QSpinBox*>", 43); tqh->insert("<QTabBar*>", 44); tqh->insert("<QTabWidget*>", 45); tqh->insert("<QTextBrowser*>", 46); tqh->insert("<QTextDocument*>", 47); tqh->insert("<QTextEdit*>", 48); tqh->insert("<QVBoxLayout*>", 49); tqh->insert("<QWidget*>", 50); return tqh; } QHash<QString, int> * qso_hash = qso_hash_init(); extern "C" { QTCEXPORT(void*,qtc_QScriptEngine_toScriptValue)(wchar_t* x0, void* x1, void* x2) { QString tq(from_method(x0)); QObject*tx1 = *((QPointer<QObject>*)x1); if (tx1->property(QTC_PROP).isValid()) tx1 = (((qtc_DynamicQObject *)tx1)->parent()); QScriptValue * tc = NULL; int x; x = qsn_hash->value(tq, -1); switch (x) { case 0: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QBrush*>((QBrush*)x2)); break; case 1: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QColor*>((QColor*)x2)); break; case 2: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QFont*>((QFont*)x2)); break; case 3: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QGLColormap*>((QGLColormap*)x2)); break; case 4: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QGLContext*>((QGLContext*)x2)); break; case 5: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QGLFormat*>((QGLFormat*)x2)); break; case 6: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QGLFramebufferObject*>((QGLFramebufferObject*)x2)); break; case 7: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QGLPixelBuffer*>((QGLPixelBuffer*)x2)); break; case 8: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QKeyEvent*>((QKeyEvent*)x2)); break; case 9: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QMouseEvent*>((QMouseEvent*)x2)); break; case 10: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QPaintEvent*>((QPaintEvent*)x2)); break; case 11: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QPainter*>((QPainter*)x2)); break; case 12: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QPainterPath*>((QPainterPath*)x2)); break; case 13: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QPalette*>((QPalette*)x2)); break; case 14: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QPen*>((QPen*)x2)); break; case 15: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QPixmap*>((QPixmap*)x2)); break; case 16: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QPixmapCache*>((QPixmapCache*)x2)); break; case 17: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QResizeEvent*>((QResizeEvent*)x2)); break; case 18: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTextCharFormat*>((QTextCharFormat*)x2)); break; case 19: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTextCursor*>((QTextCursor*)x2)); break; case 20: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTextFormat*>((QTextFormat*)x2)); break; case 21: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTextStream*>((QTextStream*)x2)); break; default: break; } return (void*)(tc); } QTCEXPORT(void*,qtc_QScriptEngine_fromScriptValue)(wchar_t* x0, void* x1, void* x2) { QString tq(from_method(x0)); QObject*tx1 = *((QPointer<QObject>*)x1); if (tx1->property(QTC_PROP).isValid()) tx1 = (((qtc_DynamicQObject *)tx1)->parent()); int x; x = qsn_hash->value(tq, -1); void * rv; switch (x) { case 0: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QBrush*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 1: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QColor*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 2: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QFont*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 3: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QGLColormap*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 4: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QGLContext*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 5: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QGLFormat*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 6: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QGLFramebufferObject*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 7: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QGLPixelBuffer*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 8: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QKeyEvent*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 9: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QMouseEvent*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 10: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QPaintEvent*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 11: rv = (void*)(((QScriptEngine*)tx1)->fromScriptValue<QPainter*>((const QScriptValue&)(*(QScriptValue*)x2))); return rv; break; case 12: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QPainterPath*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 13: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QPalette*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 14: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QPen*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 15: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QPixmap*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 16: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QPixmapCache*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 17: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QResizeEvent*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 18: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QTextCharFormat*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 19: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QTextCursor*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 20: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QTextFormat*>((const QScriptValue&)(*(QScriptValue*)x2))); break; case 21: return (void*)(((QScriptEngine*)tx1)->fromScriptValue<QTextStream*>((const QScriptValue&)(*(QScriptValue*)x2))); break; default: break; } return (void*)(NULL); } QTCEXPORT(void*,qtc_QScriptEngine_toScriptQObjectValue)(wchar_t* x0, void* x1, void* x2) { QString tq(from_method(x0)); QObject*tx1 = *((QPointer<QObject>*)x1); if (tx1->property(QTC_PROP).isValid()) tx1 = (((qtc_DynamicQObject *)tx1)->parent()); QObject*tx2 = *((QPointer<QObject>*)x2); QScriptValue * tc = NULL; int x; x = qso_hash->value(tq, -1); switch (x) { case 0: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QAbstractButton*>((QAbstractButton*)tx2)); break; case 1: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QAbstractItemView*>((QAbstractItemView*)tx2)); break; case 2: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QAbstractScrollArea*>((QAbstractScrollArea*)tx2)); break; case 3: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QAbstractSlider*>((QAbstractSlider*)tx2)); break; case 4: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QAbstractSpinBox*>((QAbstractSpinBox*)tx2)); break; case 5: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QAbstractTableModel*>((QAbstractTableModel*)tx2)); break; case 6: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QAbstractTextDocumentLayout*>((QAbstractTextDocumentLayout*)tx2)); break; case 7: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QAction*>((QAction*)tx2)); break; case 8: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QActionGroup*>((QActionGroup*)tx2)); break; case 9: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QApplication*>((QApplication*)tx2)); break; case 10: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QBoxLayout*>((QBoxLayout*)tx2)); break; case 11: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QButtonGroup*>((QButtonGroup*)tx2)); break; case 12: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QCalendarWidget*>((QCalendarWidget*)tx2)); break; case 13: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QCheckBox*>((QCheckBox*)tx2)); break; case 14: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QComboBox*>((QComboBox*)tx2)); break; case 15: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QDial*>((QDial*)tx2)); break; case 16: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QDialog*>((QDialog*)tx2)); break; case 17: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QDialogButtonBox*>((QDialogButtonBox*)tx2)); break; case 18: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QDockWidget*>((QDockWidget*)tx2)); break; case 19: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QDoubleSpinBox*>((QDoubleSpinBox*)tx2)); break; case 20: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QErrorMessage*>((QErrorMessage*)tx2)); break; case 21: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QFocusFrame*>((QFocusFrame*)tx2)); break; case 22: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QFontComboBox*>((QFontComboBox*)tx2)); break; case 23: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QGLWidget*>((QGLWidget*)tx2)); break; case 24: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QGridLayout*>((QGridLayout*)tx2)); break; case 25: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QGroupBox*>((QGroupBox*)tx2)); break; case 26: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QHBoxLayout*>((QHBoxLayout*)tx2)); break; case 27: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QHeaderView*>((QHeaderView*)tx2)); break; case 28: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QIODevice*>((QIODevice*)tx2)); break; case 29: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QLCDNumber*>((QLCDNumber*)tx2)); break; case 30: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QLabel*>((QLabel*)tx2)); break; case 31: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QLayout*>((QLayout*)tx2)); break; case 32: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QLineEdit*>((QLineEdit*)tx2)); break; case 33: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QMenu*>((QMenu*)tx2)); break; case 34: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QMenuBar*>((QMenuBar*)tx2)); break; case 35: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QMessageBox*>((QMessageBox*)tx2)); break; case 36: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QProgressBar*>((QProgressBar*)tx2)); break; case 37: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QProgressDialog*>((QProgressDialog*)tx2)); break; case 38: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QPushButton*>((QPushButton*)tx2)); break; case 39: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QRubberBand*>((QRubberBand*)tx2)); break; case 40: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QScrollArea*>((QScrollArea*)tx2)); break; case 41: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QScrollBar*>((QScrollBar*)tx2)); break; case 42: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QSlider*>((QSlider*)tx2)); break; case 43: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QSpinBox*>((QSpinBox*)tx2)); break; case 44: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTabBar*>((QTabBar*)tx2)); break; case 45: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTabWidget*>((QTabWidget*)tx2)); break; case 46: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTextBrowser*>((QTextBrowser*)tx2)); break; case 47: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTextDocument*>((QTextDocument*)tx2)); break; case 48: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QTextEdit*>((QTextEdit*)tx2)); break; case 49: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QVBoxLayout*>((QVBoxLayout*)tx2)); break; case 50: tc = new QScriptValue(((QScriptEngine*)tx1)->toScriptValue<QWidget*>((QWidget*)tx2)); break; default: break; } return (void*)(tc); } QTCEXPORT(void*,qtc_QScriptEngine_fromScriptQObjectValue)(wchar_t* x0, void* x1, void* x2) { QString tq(from_method(x0)); QObject*tx1 = *((QPointer<QObject>*)x1); if (tx1->property(QTC_PROP).isValid()) tx1 = (((qtc_DynamicQObject *)tx1)->parent()); QObject*tx2 = *((QPointer<QObject>*)x2); int x; x = qsn_hash->value(tq, -1); switch (x) { case 0: { QAbstractButton * tc = ((QScriptEngine*)tx1)->fromScriptValue<QAbstractButton*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QAbstractButton> * ttc = new QPointer<QAbstractButton>(tc); return (void*)(ttc); } break; case 1: { QAbstractItemView * tc = ((QScriptEngine*)tx1)->fromScriptValue<QAbstractItemView*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QAbstractItemView> * ttc = new QPointer<QAbstractItemView>(tc); return (void*)(ttc); } break; case 2: { QAbstractScrollArea * tc = ((QScriptEngine*)tx1)->fromScriptValue<QAbstractScrollArea*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QAbstractScrollArea> * ttc = new QPointer<QAbstractScrollArea>(tc); return (void*)(ttc); } break; case 3: { QAbstractSlider * tc = ((QScriptEngine*)tx1)->fromScriptValue<QAbstractSlider*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QAbstractSlider> * ttc = new QPointer<QAbstractSlider>(tc); return (void*)(ttc); } break; case 4: { QAbstractSpinBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QAbstractSpinBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QAbstractSpinBox> * ttc = new QPointer<QAbstractSpinBox>(tc); return (void*)(ttc); } break; case 5: { QAbstractTableModel * tc = ((QScriptEngine*)tx1)->fromScriptValue<QAbstractTableModel*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QAbstractTableModel> * ttc = new QPointer<QAbstractTableModel>(tc); return (void*)(ttc); } break; case 6: { QAbstractTextDocumentLayout * tc = ((QScriptEngine*)tx1)->fromScriptValue<QAbstractTextDocumentLayout*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QAbstractTextDocumentLayout> * ttc = new QPointer<QAbstractTextDocumentLayout>(tc); return (void*)(ttc); } break; case 7: { QAction * tc = ((QScriptEngine*)tx1)->fromScriptValue<QAction*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QAction> * ttc = new QPointer<QAction>(tc); return (void*)(ttc); } break; case 8: { QActionGroup * tc = ((QScriptEngine*)tx1)->fromScriptValue<QActionGroup*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QActionGroup> * ttc = new QPointer<QActionGroup>(tc); return (void*)(ttc); } break; case 9: { QApplication * tc = ((QScriptEngine*)tx1)->fromScriptValue<QApplication*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QApplication> * ttc = new QPointer<QApplication>(tc); return (void*)(ttc); } break; case 10: { QBoxLayout * tc = ((QScriptEngine*)tx1)->fromScriptValue<QBoxLayout*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QBoxLayout> * ttc = new QPointer<QBoxLayout>(tc); return (void*)(ttc); } break; case 11: { QButtonGroup * tc = ((QScriptEngine*)tx1)->fromScriptValue<QButtonGroup*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QButtonGroup> * ttc = new QPointer<QButtonGroup>(tc); return (void*)(ttc); } break; case 12: { QCalendarWidget * tc = ((QScriptEngine*)tx1)->fromScriptValue<QCalendarWidget*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QCalendarWidget> * ttc = new QPointer<QCalendarWidget>(tc); return (void*)(ttc); } break; case 13: { QCheckBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QCheckBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QCheckBox> * ttc = new QPointer<QCheckBox>(tc); return (void*)(ttc); } break; case 14: { QComboBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QComboBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QComboBox> * ttc = new QPointer<QComboBox>(tc); return (void*)(ttc); } break; case 15: { QDial * tc = ((QScriptEngine*)tx1)->fromScriptValue<QDial*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QDial> * ttc = new QPointer<QDial>(tc); return (void*)(ttc); } break; case 16: { QDialog * tc = ((QScriptEngine*)tx1)->fromScriptValue<QDialog*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QDialog> * ttc = new QPointer<QDialog>(tc); return (void*)(ttc); } break; case 17: { QDialogButtonBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QDialogButtonBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QDialogButtonBox> * ttc = new QPointer<QDialogButtonBox>(tc); return (void*)(ttc); } break; case 18: { QDockWidget * tc = ((QScriptEngine*)tx1)->fromScriptValue<QDockWidget*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QDockWidget> * ttc = new QPointer<QDockWidget>(tc); return (void*)(ttc); } break; case 19: { QDoubleSpinBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QDoubleSpinBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QDoubleSpinBox> * ttc = new QPointer<QDoubleSpinBox>(tc); return (void*)(ttc); } break; case 20: { QErrorMessage * tc = ((QScriptEngine*)tx1)->fromScriptValue<QErrorMessage*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QErrorMessage> * ttc = new QPointer<QErrorMessage>(tc); return (void*)(ttc); } break; case 21: { QFocusFrame * tc = ((QScriptEngine*)tx1)->fromScriptValue<QFocusFrame*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QFocusFrame> * ttc = new QPointer<QFocusFrame>(tc); return (void*)(ttc); } break; case 22: { QFontComboBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QFontComboBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QFontComboBox> * ttc = new QPointer<QFontComboBox>(tc); return (void*)(ttc); } break; case 23: { QGLWidget * tc = ((QScriptEngine*)tx1)->fromScriptValue<QGLWidget*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QGLWidget> * ttc = new QPointer<QGLWidget>(tc); return (void*)(ttc); } break; case 24: { QGridLayout * tc = ((QScriptEngine*)tx1)->fromScriptValue<QGridLayout*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QGridLayout> * ttc = new QPointer<QGridLayout>(tc); return (void*)(ttc); } break; case 25: { QGroupBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QGroupBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QGroupBox> * ttc = new QPointer<QGroupBox>(tc); return (void*)(ttc); } break; case 26: { QHBoxLayout * tc = ((QScriptEngine*)tx1)->fromScriptValue<QHBoxLayout*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QHBoxLayout> * ttc = new QPointer<QHBoxLayout>(tc); return (void*)(ttc); } break; case 27: { QHeaderView * tc = ((QScriptEngine*)tx1)->fromScriptValue<QHeaderView*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QHeaderView> * ttc = new QPointer<QHeaderView>(tc); return (void*)(ttc); } break; case 28: { QIODevice * tc = ((QScriptEngine*)tx1)->fromScriptValue<QIODevice*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QIODevice> * ttc = new QPointer<QIODevice>(tc); return (void*)(ttc); } break; case 29: { QLCDNumber * tc = ((QScriptEngine*)tx1)->fromScriptValue<QLCDNumber*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QLCDNumber> * ttc = new QPointer<QLCDNumber>(tc); return (void*)(ttc); } break; case 30: { QLabel * tc = ((QScriptEngine*)tx1)->fromScriptValue<QLabel*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QLabel> * ttc = new QPointer<QLabel>(tc); return (void*)(ttc); } break; case 31: { QLayout * tc = ((QScriptEngine*)tx1)->fromScriptValue<QLayout*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QLayout> * ttc = new QPointer<QLayout>(tc); return (void*)(ttc); } break; case 32: { QLineEdit * tc = ((QScriptEngine*)tx1)->fromScriptValue<QLineEdit*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QLineEdit> * ttc = new QPointer<QLineEdit>(tc); return (void*)(ttc); } break; case 33: { QMenu * tc = ((QScriptEngine*)tx1)->fromScriptValue<QMenu*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QMenu> * ttc = new QPointer<QMenu>(tc); return (void*)(ttc); } break; case 34: { QMenuBar * tc = ((QScriptEngine*)tx1)->fromScriptValue<QMenuBar*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QMenuBar> * ttc = new QPointer<QMenuBar>(tc); return (void*)(ttc); } break; case 35: { QMessageBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QMessageBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QMessageBox> * ttc = new QPointer<QMessageBox>(tc); return (void*)(ttc); } break; case 36: { QProgressBar * tc = ((QScriptEngine*)tx1)->fromScriptValue<QProgressBar*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QProgressBar> * ttc = new QPointer<QProgressBar>(tc); return (void*)(ttc); } break; case 37: { QProgressDialog * tc = ((QScriptEngine*)tx1)->fromScriptValue<QProgressDialog*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QProgressDialog> * ttc = new QPointer<QProgressDialog>(tc); return (void*)(ttc); } break; case 38: { QPushButton * tc = ((QScriptEngine*)tx1)->fromScriptValue<QPushButton*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QPushButton> * ttc = new QPointer<QPushButton>(tc); return (void*)(ttc); } break; case 39: { QRubberBand * tc = ((QScriptEngine*)tx1)->fromScriptValue<QRubberBand*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QRubberBand> * ttc = new QPointer<QRubberBand>(tc); return (void*)(ttc); } break; case 40: { QScrollArea * tc = ((QScriptEngine*)tx1)->fromScriptValue<QScrollArea*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QScrollArea> * ttc = new QPointer<QScrollArea>(tc); return (void*)(ttc); } break; case 41: { QScrollBar * tc = ((QScriptEngine*)tx1)->fromScriptValue<QScrollBar*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QScrollBar> * ttc = new QPointer<QScrollBar>(tc); return (void*)(ttc); } break; case 42: { QSlider * tc = ((QScriptEngine*)tx1)->fromScriptValue<QSlider*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QSlider> * ttc = new QPointer<QSlider>(tc); return (void*)(ttc); } break; case 43: { QSpinBox * tc = ((QScriptEngine*)tx1)->fromScriptValue<QSpinBox*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QSpinBox> * ttc = new QPointer<QSpinBox>(tc); return (void*)(ttc); } break; case 44: { QTabBar * tc = ((QScriptEngine*)tx1)->fromScriptValue<QTabBar*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QTabBar> * ttc = new QPointer<QTabBar>(tc); return (void*)(ttc); } break; case 45: { QTabWidget * tc = ((QScriptEngine*)tx1)->fromScriptValue<QTabWidget*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QTabWidget> * ttc = new QPointer<QTabWidget>(tc); return (void*)(ttc); } break; case 46: { QTextBrowser * tc = ((QScriptEngine*)tx1)->fromScriptValue<QTextBrowser*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QTextBrowser> * ttc = new QPointer<QTextBrowser>(tc); return (void*)(ttc); } break; case 47: { QTextDocument * tc = ((QScriptEngine*)tx1)->fromScriptValue<QTextDocument*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QTextDocument> * ttc = new QPointer<QTextDocument>(tc); return (void*)(ttc); } break; case 48: { QTextEdit * tc = ((QScriptEngine*)tx1)->fromScriptValue<QTextEdit*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QTextEdit> * ttc = new QPointer<QTextEdit>(tc); return (void*)(ttc); } break; case 49: { QVBoxLayout * tc = ((QScriptEngine*)tx1)->fromScriptValue<QVBoxLayout*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QVBoxLayout> * ttc = new QPointer<QVBoxLayout>(tc); return (void*)(ttc); } break; case 50: { QWidget * tc = ((QScriptEngine*)tx1)->fromScriptValue<QWidget*>((const QScriptValue&)(*(QScriptValue*)tx2)); QPointer<QWidget> * ttc = new QPointer<QWidget>(tc); return (void*)(ttc); } break; default: break; } return (void*)(NULL); } }
shuchitamathur28/bitrix24
bitrix/modules/imconnector/install/components/bitrix/imconnector.whatsappbytwilio/templates/.default/script.js
;(function (window) { window.checkWhatsAppByTwilioFirst = function () { document.getElementById('webform-small-button-have').disabled = this.value ? false : "disabled"; }; BX.ready(function () { BX.bindDelegate( document.body, 'click', {className: 'copy-to-clipboard'}, copyToClipboard ); BX.bindDelegate( document.body, 'keyup', {props: {id: 'imconnector-whatsappbytwilio-sid'}}, checkWhatsAppByTwilioFirst ); BX.bindDelegate( document.body, 'mouseout', {props: {id: 'imconnector-whatsappbytwilio-sid'}}, checkWhatsAppByTwilioFirst ); BX.bindDelegate( document.body, 'keyup', {props: {id: 'imconnector-whatsappbytwilio-auth-token'}}, checkWhatsAppByTwilioFirst ); BX.bindDelegate( document.body, 'mouseout', {props: {id: 'imconnector-whatsappbytwilio-auth-token'}}, checkWhatsAppByTwilioFirst ); BX.bindDelegate( document.body, 'click', {className: 'show-preloader-button'}, addPreloader ); BX.bindDelegate( document.body, 'submit', {tag: 'form'}, addPreloader ); }); })(window);
jpetazzo/squash
test/utils/utils.go
package e2e_test import ( "encoding/json" "fmt" "log" "math/rand" "os/exec" "github.com/solo-io/squash/pkg/models" v1 "k8s.io/client-go/pkg/api/v1" ) type Kubectl struct { Context, Namespace string } func NewKubectl(kubectlctx string) *Kubectl { return &Kubectl{ Context: kubectlctx, Namespace: fmt.Sprintf("test-%d", rand.Uint64()), } } func (k *Kubectl) CreateNS() error { args := []string{"create", "namespace", k.Namespace} return k.innerprepare(args).Run() } func (k *Kubectl) DeleteNS() error { if k.Namespace != "" { args := []string{"delete", "namespace", k.Namespace} return k.innerprepare(args).Run() } return nil } func (k *Kubectl) Run(args ...string) error { // args := []string{"--namespace="+k.Namespace, "--context="k.Context} return k.innerunns(args) } func (k *Kubectl) Pods() (*v1.PodList, error) { // args := []string{"--namespace="+k.Namespace, "--context="k.Context} out, err := k.Prepare("get", "pods", "--output=json").Output() if err != nil { return nil, err } var pods v1.PodList err = json.Unmarshal(out, &pods) if err != nil { return nil, err } return &pods, nil } func (k *Kubectl) Logs(name string) ([]byte, error) { // args := []string{"--namespace="+k.Namespace, "--context="k.Context} return k.Prepare("logs", name).CombinedOutput() } func (k *Kubectl) Prepare(args ...string) *exec.Cmd { // args := []string{"--namespace="+k.Namespace, "--context="k.Context} return k.innerpreparens(args) } func (k *Kubectl) innerunns(args []string) error { return k.innerpreparens(args).Run() } func (k *Kubectl) innerpreparens(args []string) *exec.Cmd { newargs := []string{"--namespace=" + k.Namespace} newargs = append(newargs, args...) return k.innerprepare(newargs) } func (k *Kubectl) innerprepare(args []string) *exec.Cmd { var newargs []string if k.Context != "" { newargs = []string{"--context=" + k.Context} } newargs = append(newargs, args...) log.Println("kubectl", newargs) cmd := exec.Command("kubectl", newargs...) return cmd } func NewSquash(k *Kubectl) *Squash { return &Squash{Namespace: k.Namespace} } type Squash struct { Namespace string } func (s *Squash) Attach(image, pod, container, dbgger string) (*models.DebugConfig, error) { cmd := s.run("debug-container", image, pod, container, dbgger) out, err := cmd.Output() if err != nil { return nil, err } var dbgconfig models.DebugConfig err = json.Unmarshal(out, &dbgconfig) if err != nil { return nil, err } return &dbgconfig, nil } func (s *Squash) Service(image, service, dbgger string, bp ...string) (*models.DebugConfig, error) { cmdline := []string{"debug-service", service, image, dbgger} for _, b := range bp { cmdline = append(cmdline, "--breakpoint="+b) } cmd := s.run(cmdline...) out, err := cmd.Output() if err != nil { log.Println("Failed service attach:", string(out)) return nil, err } var dbgconfig models.DebugConfig err = json.Unmarshal(out, &dbgconfig) if err != nil { log.Println("Failed service attach:", string(out)) return nil, err } return &dbgconfig, nil } func (s *Squash) Wait(id string) (*models.DebugSession, error) { cmd := s.run("wait", id, "--timeout", "90") out, err := cmd.CombinedOutput() if err != nil { log.Println("Failed service wait:", string(out)) return nil, err } var dbgsession models.DebugSession err = json.Unmarshal(out, &dbgsession) if err != nil { log.Println("Failed service wait:", string(out)) return nil, err } return &dbgsession, nil } func (s *Squash) run(args ...string) *exec.Cmd { url := fmt.Sprintf("--url=http://localhost:8001/api/v1/namespaces/%s/services/squash-server-service/proxy/api/v1", s.Namespace) newargs := []string{url, "--json"} newargs = append(newargs, args...) cmd := exec.Command("../../target/squash", newargs...) log.Println("squash:", cmd.Args) return cmd } func Inittest(k *Kubectl) (func(), error) { if err := k.CreateNS(); err != nil { fmt.Println("error creating ns", err) return nil, err } fmt.Printf("create sutff %v \n", k) if err := k.Run("create", "-f", "../../target/kubernetes/squash-server.yml"); err != nil { return nil, err } if err := k.Run("create", "-f", "../../target/kubernetes/squash-ds.yml"); err != nil { return nil, err } if err := k.Run("create", "-f", "../../contrib/example/service1/service1.yml"); err != nil { return nil, err } return func() { k.DeleteNS() }, nil }
custergo/study_algo
01.Play-with-Data-Structures/02-Arrays/03-Add-Element-in-Array/Array_test.go
package _3_Add_Element_in_Array import ( "fmt" "testing" ) func TestArray(t *testing.T) { arr := NewArray(5) fmt.Println(arr.GetSize()) arr.AddLast(1) arr.AddLast(2) arr.AddLast(3) arr.Add(1, 5) fmt.Println(arr) fmt.Println(arr.GetSize()) }
achanana/terrier
src/include/planner/plannodes/index_scan_plan_node.h
#pragma once #include <memory> #include <string> #include <utility> #include <vector> #include "catalog/catalog_defs.h" #include "catalog/schema.h" #include "common/hash_util.h" #include "parser/expression/abstract_expression.h" #include "planner/plannodes/abstract_scan_plan_node.h" // TODO(Gus,Wen): IndexScanDesc had a `p_runtime_key_list` that did not have a comment explaining its use. We should // figure that out. IndexScanDesc also had an expression type list, i dont see why this can't just be taken from the // predicate // TODO(Gus,Wen): plan node contained info on whether the scan was left or right open. This should be computed at // exection time namespace terrier::planner { /** * Plan node for an index scan */ class IndexScanPlanNode : public AbstractScanPlanNode { public: /** * Builder for an index scan plan node */ class Builder : public AbstractScanPlanNode::Builder<Builder> { public: Builder() = default; /** * Don't allow builder to be copied or moved */ DISALLOW_COPY_AND_MOVE(Builder); /** * @param oid oid for index to use for scan * @return builder object */ Builder &SetIndexOid(catalog::index_oid_t oid) { index_oid_ = oid; return *this; } /** * Build the Index scan plan node * @return plan node */ std::unique_ptr<IndexScanPlanNode> Build() { return std::unique_ptr<IndexScanPlanNode>(new IndexScanPlanNode(std::move(children_), std::move(output_schema_), scan_predicate_, is_for_update_, is_parallel_, database_oid_, namespace_oid_, index_oid_)); } protected: /** * index OID to be used for scan */ catalog::index_oid_t index_oid_; }; private: /** * @param children child plan nodes * @param output_schema Schema representing the structure of the output of this plan node * @param predicate predicate used for performing scan * @param is_for_update scan is used for an update * @param is_parallel parallel scan flag * @param database_oid database oid for scan * @param index_oid OID of index to be used in index scan */ IndexScanPlanNode(std::vector<std::unique_ptr<AbstractPlanNode>> &&children, std::unique_ptr<OutputSchema> output_schema, common::ManagedPointer<parser::AbstractExpression> predicate, bool is_for_update, bool is_parallel, catalog::db_oid_t database_oid, catalog::namespace_oid_t namespace_oid, catalog::index_oid_t index_oid) : AbstractScanPlanNode(std::move(children), std::move(output_schema), predicate, is_for_update, is_parallel, database_oid, namespace_oid), index_oid_(index_oid) {} public: /** * Default constructor used for deserialization */ IndexScanPlanNode() = default; DISALLOW_COPY_AND_MOVE(IndexScanPlanNode) /** * @return index OID to be used for scan */ catalog::index_oid_t GetIndexOid() const { return index_oid_; } /** * @return the type of this plan node */ PlanNodeType GetPlanNodeType() const override { return PlanNodeType::INDEXSCAN; } /** * @return the hashed value of this plan node */ common::hash_t Hash() const override; bool operator==(const AbstractPlanNode &rhs) const override; nlohmann::json ToJson() const override; std::vector<std::unique_ptr<parser::AbstractExpression>> FromJson(const nlohmann::json &j) override; private: /** * Index oid associated with index scan */ catalog::index_oid_t index_oid_; }; DEFINE_JSON_DECLARATIONS(IndexScanPlanNode) } // namespace terrier::planner
wgziOS/TestCarPort
carport/carport/XMGNavigationController.h
<gh_stars>0 // // XMGNavigationController.h // carport // // Created by 吴桂钊 on 2016/12/5. // Copyright © 2016年 8<EMAIL>. All rights reserved. // #import <UIKit/UIKit.h> @interface XMGNavigationController : UINavigationController @end
sdss/lvmmodel
bin/fiberloss.py
<reponame>sdss/lvmmodel #!/usr/bin/env python # # python version of fiberloss.pro # <NAME> 2014/06/23 # # adapted to include telescope blur and updated wavelength dependence # <NAME> 2014/06/26 # # Compute the fiber input losses for the benchmark spectra cases # Fiber diameter 1.5 arcsec # Seeing is 1.1 arcsec FWHM with Moffat beta=3.5, and scale with # wavelength as (6355./wave)^0.2 # Lateral offset is 0.2 arcsec from fiber center # Cases are: # * Point source # * ELG with half-light radius 0.45 arcsec # * LRG with half-light radius 1.0 arcsec # # TO DO # - Refactor into module function + wrapper script # - Extract hard coded parameters into a fiberloss.yaml file import sys, os from math import * import numpy from scipy.signal import fftconvolve from scipy.interpolate import InterpolatedUnivariateSpline import yaml #- Check options before doing anything import argparse parser = argparse.ArgumentParser(prog=sys.argv[0]) parser.add_argument("-o", "--outdir", action='store', metavar='DIR', help="write fiberloss-*.dat files to DIR.") parser.add_argument("-t", "--test", action="store_true", help="test convolution code") opts = parser.parse_args() #- Read desi.yaml to get typical fiber size and plate scale desiparams = yaml.load(open(os.getenv('DESIMODEL')+'/data/desi.yaml')) platescale = desiparams['fibers']['diameter_um'] / desiparams['fibers']['diameter_arcsec'] fiber_radius = desiparams['fibers']['diameter_arcsec'] / 2.0 #- read DESI blur from 0347 system throughput file blurfile = os.getenv('DESIMODEL')+'/data/inputs/throughput/DESI-0347-throughput.txt' tmp = numpy.loadtxt(blurfile).T blurwave = tmp[0] * 10 #- nm -> Angstroms blur_arcsec = tmp[4] / platescale blur = InterpolatedUnivariateSpline(blurwave, blur_arcsec) #- Hard coded parameters; should move into a parameter file seeing = 1.1 # FWHM in arcsec wave_ref = 6355 # reference wavelength for seeing seeing_scale = 0.2 # seeing(wave) = seeing * (wave_ref/wave)^seeing_scale beta = 3.5 # Moffat profile parameter offset = 0.20 # lateral error in arcsec r_elg = 0.45 # half-light radius for ELGs r_lrg = 1.0 # half-light radius for LRGs ### mayall_blur = 0.22 # RMS blur (arcsec) from telescope included in Dey & Valdez seeing mayall_blur = desiparams['jacoby_seeing'] #- size and resolution of image to simulate npix = 501 # number of pixels across image pixscale = 0.025 # arcsec/pix #- Remove mayall_blur from seeing seeing_sigma = numpy.sqrt( (seeing/2.35482)**2 - mayall_blur**2 ) site_seeing = seeing_sigma * 2.35482 #- Coordinates and mask for offset fiber on the image coord = (numpy.arange((npix))-npix/2)*pixscale # coord along one axis, in arcsec x = coord.reshape(npix,1) y = coord.reshape(1,npix) x = x+0*y # now a 2D array of the x coordinates y = y+0*x # now a 2D array of the y coordinates radius = numpy.sqrt(x**2+y**2) # distance from center of object radius_from_fiber_center = numpy.sqrt((x-offset)**2+y**2) # distance from center of fiber fiber_mask = (radius_from_fiber_center<fiber_radius) # 1=in fiber # test of numpy.fft.rfft2 or fftconvolve, who knows what happens with another version of python if opts.test : sigma=1.1 img_seeing = 1./(2*pi*sigma**2)*numpy.exp(-(radius**2/2/sigma**2)) # img_seeing2 = numpy.fft.irfft2(numpy.fft.rfft2(img_seeing) * numpy.fft.rfft2(img_seeing), img_seeing.shape) # img_seeing2 = numpy.roll(numpy.roll(img_seeing2,npix/2+1,axis=0),npix/2+1,axis=1)*pixscale**2 # re-center and normalize img_seeing2 = fftconvolve(img_seeing, img_seeing, mode='same')*pixscale**2 img_seeing3 = 1./(2*pi*2*sigma**2)*numpy.exp(-(radius**2/2/(2*sigma**2))) if abs(numpy.sum(img_seeing2)/numpy.sum(img_seeing3)-1)>0.01 or abs(numpy.sum(img_seeing2*fiber_mask)/numpy.sum(img_seeing3*fiber_mask)-1)>0.01: print("error in the convolution using numpy.fft.rfft2") print(numpy.sum(img_seeing)*pixscale**2,numpy.sum(img_seeing2)*pixscale**2,numpy.sum(img_seeing3)*pixscale**2) sys.exit(12) else: print("Convolution test passed; your scipy is OK") sys.exit(0) waves = numpy.arange(3500.,10001.,250.) input_sky = numpy.ones(len(waves)) input_star = numpy.zeros(len(waves)) input_elg = numpy.zeros(len(waves)) input_lrg = numpy.zeros(len(waves)) print("# Fiber input geometric acceptance") print("# {} arcsec seeing at {} Angstroms, Moffat beta={}".format(seeing, wave_ref, beta)) print("# seeing wavelength dependence scales as ({}/lambda)^{}".format(wave_ref, seeing_scale)) print("# removes {} arcsec existing Mayall blur then adds DESI blur".format(mayall_blur)) print("# lateral positioner offset {} arcsec".format(offset)) print("# point = point source, e.g. a star") print("# elg = Exponential half-light radius {}".format(r_elg)) print("# lrg = de Vaucouleurs half-light radius {}".format(r_lrg)) print("# ") print("# wave star elg lrg") #- Reference ELG and LRG images img_elg = numpy.exp(-1.678*radius/r_elg) img_lrg = numpy.exp(-7.67*((radius/r_lrg)**0.25 - 1)) for i, wave in enumerate(waves): #- Input seeing image fwhm = site_seeing * (wave_ref/wave)**seeing_scale alpha = 0.5 * fwhm / sqrt(2.**(1./beta) -1) img_seeing = (beta - 1) * (pi * alpha**2)**(-1) * (1 + radius**2/alpha**2)**(-beta) #- convolve with telescope blur img_blur = numpy.exp(-radius**2 / (2*blur(wave)**2)) img_blur /= numpy.sum(img_blur) img_seeing = fftconvolve(img_seeing, img_blur, mode='same') #- Point source (star) input acceptance input_star[i] = numpy.sum(img_seeing*fiber_mask)/numpy.sum(img_seeing) # for comparison with fiberloss.pro, trim img_seeing # img_seeing *= ((abs(x)<0.2*npix*pixscale)&(abs(y)<0.2*npix*pixscale)) #- Convolve ELG image with seeing+blur #img_elg2 = numpy.fft.irfft2(numpy.fft.rfft2(img_elg) * numpy.fft.rfft2(img_seeing), img_elg.shape) #img_elg2 = numpy.roll(numpy.roll(img_elg2,npix/2+1,axis=0),npix/2+1,axis=1)*pixscale**2 # re-center and normalize img_elg2 = fftconvolve(img_elg, img_seeing, mode='same') * pixscale**2 #- ELG input acceptance input_elg[i] = numpy.sum(img_elg2*fiber_mask)/numpy.sum(img_elg2) #- Convolve LRG image with seeing+blur #img_lrg2 = numpy.fft.irfft2(numpy.fft.rfft2(img_lrg) * numpy.fft.rfft2(img_seeing), img_lrg.shape) #img_lrg2 = numpy.roll(numpy.roll(img_lrg2,npix/2+1,axis=0),npix/2+1,axis=1)*pixscale**2 # re-center and normalize img_lrg2 = fftconvolve(img_lrg, img_seeing, mode='same') * pixscale**2 #- LRG input acceptance input_lrg[i] = numpy.sum(img_lrg2*fiber_mask)/numpy.sum(img_lrg2) print("{:7.1f} {:8.5f} {:8.5f} {:8.5f}".format(wave, input_star[i], input_elg[i], input_lrg[i])) #- Write output files if --outdir is given if opts.outdir is not None: header = """\ # Fiber input geometric acceptance # {seeing} arcsec seeing with Moffat beta={beta} scales as ({wave_ref}/lambda)^{seeing_scale} # Calculation removes {mayall_blur} arcsec existing Mayall blur then adds DESI blur # Lateral positioner offset={offset} arcsec""".format( seeing=seeing, beta=beta, wave_ref=wave_ref, seeing_scale=seeing_scale, mayall_blur=mayall_blur, offset=offset) #- Point source / star fx = open(opts.outdir+'/fiberloss-star.dat', 'w') print(header, file=fx) print("#", file=fx) print("# Star / point-source", file=fx) print("#", file=fx) print("# Wavelength FiberAcceptance", file=fx) for w, t in zip(waves, input_star): print("{:7.1f} {:8.5f}".format(w, t), file=fx) fx.close() #- Also write out QSOs as if they are point sources fx = open(opts.outdir+'/fiberloss-qso.dat', 'w') print(header, file=fx) print("#", file=fx) print("# QSO, treating as a point-source", file=fx) print("#", file=fx) print("# Wavelength FiberAcceptance", file=fx) for w, t in zip(waves, input_star): print("{:7.1f} {:8.5f}".format(w, t), file=fx) fx.close() fx = open(opts.outdir+'/fiberloss-elg.dat', 'w') print(header, file=fx) print("#", file=fx) print("# ELG with exponential half-light radius={} arcsec".format(r_elg), file=fx) print("#", file=fx) print("# Wavelength FiberAcceptance", file=fx) for w, t in zip(waves, input_elg): print("{:7.1f} {:8.5f}".format(w, t), file=fx) fx.close() fx = open(opts.outdir+'/fiberloss-lrg.dat', 'w') print(header, file=fx) print("#", file=fx) print("# LRG with de Vaucouleurs half-light radius={} arcsec".format(r_lrg), file=fx) print("#", file=fx) print("# Wavelength FiberAcceptance", file=fx) for w, t in zip(waves, input_lrg): print("{:7.1f} {:8.5f}".format(w, t), file=fx) fx.close() fx = open(opts.outdir+'/fiberloss-sky.dat', 'w') print("# Sky and calibration lamp spectra do not have fiber input losses", file=fx) print("#", file=fx) print("# Wavelength FiberAcceptance", file=fx) for w, t in zip(waves, input_sky): print("{:7.1f} {:8.5f}".format(w, t), file=fx) fx.close()
wfang/Apollo
src/gwt/org/bbop/apollo/gwt/client/SuggestedNameOracle.java
package org.bbop.apollo.gwt.client; import com.google.gwt.core.client.GWT; import com.google.gwt.http.client.RequestBuilder; import com.google.gwt.http.client.RequestCallback; import com.google.gwt.http.client.RequestException; import com.google.gwt.json.client.JSONArray; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONParser; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.SuggestOracle; import org.gwtbootstrap3.extras.bootbox.client.Bootbox; import java.util.ArrayList; import java.util.List; public class SuggestedNameOracle extends SuggestOracle { private String organismName; private String featureType; @Override public void requestSuggestions(final Request suggestRequest, final Callback suggestCallback) { final List<Suggestion> suggestionList = new ArrayList<>(); final String queryString = suggestRequest.getQuery(); String url = Annotator.getRootUrl() + "suggestedName/search"; url += "?query=" + suggestRequest.getQuery(); url += "&organism=" + organismName; url += "&featureType=" + featureType; RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, url); try { rb.sendRequest(null, new RequestCallback() { @Override public void onResponseReceived(com.google.gwt.http.client.Request request, com.google.gwt.http.client.Response response) { // always suggest thyself suggestionList.add(new Suggestion() { @Override public String getDisplayString() { return queryString; } @Override public String getReplacementString() { return queryString; } }); JSONArray jsonArray = JSONParser.parseStrict(response.getText()).isArray(); for (int i = 0; i < jsonArray.size(); i++) { // always suggest thyself JSONObject jsonObject = jsonArray.get(i).isObject(); final String name = jsonObject.get("name").isString().stringValue(); suggestionList.add(new Suggestion() { @Override public String getDisplayString() { // TODO: add mathcing string // String displayString = queryString return name; } @Override public String getReplacementString() { return name; } }); } Response r = new Response(); r.setSuggestions(suggestionList); suggestCallback.onSuggestionsReady(suggestRequest, r); } @Override public void onError(com.google.gwt.http.client.Request request, Throwable exception) { Bootbox.alert("There was an error with the request: " + exception.getMessage()); } }); } catch (RequestException e) { Bootbox.alert("Request exception via " + e); } } public String getOrganismName() { return organismName; } public void setOrganismName(String organismName) { this.organismName = organismName; } public String getFeatureType() { return featureType; } public void setFeatureType(String featureType) { this.featureType = featureType; } }
fairyly/js-test
vsjavas-code/code/testangular2/todo/public/src/app/tasks/tasks-sort.pipe.js
/*** * Excerpted from "Test-Driving JavaScript Applications", * published by The Pragmatic Bookshelf. * Copyrights apply to this code. It may not be used to create training material, * courses, books, articles, and the like. Contact us if you are in doubt. * We make no guarantees that this code is fit for any purpose. * Visit http://www.pragmaticprogrammer.com/titles/vsjavas for more book information. ***/ (function(app) { app.TasksSortPipe = ng.core .Pipe({ name: 'sort' }) .Class({ constructor: function() {}, transform: function(tasks) { var compareTwoTasks = function(task1, task2) { return task1.year - task2.year || task1.month - task2.month || task1.day - task2.day || task1.name.localeCompare(task2.name); }; return tasks.slice().sort(compareTwoTasks); } }); })(window.app || (window.app = {}));
Yimura/Fabric-StackMob
src/main/java/sh/damon/stackmob/entity/traits/trait/MooshroomVariant.java
<filename>src/main/java/sh/damon/stackmob/entity/traits/trait/MooshroomVariant.java<gh_stars>0 package sh.damon.stackmob.entity.traits.trait; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.passive.MooshroomEntity; import net.minecraft.nbt.NbtCompound; import sh.damon.stackmob.entity.traits.Trait; import sh.damon.stackmob.entity.traits.TraitMetadata; @TraitMetadata(assignable = MooshroomEntity.class, path = "mooshroom-variant") public class MooshroomVariant implements Trait { @Override public void applyTrait(LivingEntity spawned, LivingEntity dead) { NbtCompound nbt = new NbtCompound(); ((MooshroomEntity) dead).writeCustomDataToNbt(nbt); ((MooshroomEntity) spawned).readCustomDataFromNbt(nbt); } @Override public boolean checkTrait(LivingEntity first, LivingEntity second) { return ((MooshroomEntity) first).getMooshroomType() == ((MooshroomEntity) second).getMooshroomType(); } }
gabizou/SpongeDownloads
api/project.go
<reponame>gabizou/SpongeDownloads<gh_stars>1-10 package api import ( "database/sql" "github.com/SpongePowered/DownloadIndexer/httperror" "github.com/SpongePowered/DownloadIndexer/maven" "github.com/lib/pq" "gopkg.in/macaron.v1" "net/http" "sort" "time" ) type project struct { Name string `json:"name"` PluginID string `json:"pluginId"` GitHub struct { Owner string `json:"owner"` Repo string `json:"repo"` } `json:"github"` BuildTypes map[string]*buildType `json:"buildTypes,omitempty"` Versions versions `json:"versions,omitempty"` Dependencies map[string]versions `json:"dependencies,omitempty"` } type buildType struct { id int Latest *build `json:"latest,omitempty"` Recommended *build `json:"recommended,omitempty"` } type build struct { id int Version string `json:"version"` Dependencies map[string]string `json:"dependencies,omitempty"` } func (a *API) GetProject(ctx *macaron.Context, c maven.Identifier) error { p := project{BuildTypes: make(map[string]*buildType), Dependencies: make(map[string]versions)} var projectID int var useSemVer bool var lastUpdated time.Time err := a.DB.QueryRow("SELECT project_id, name, plugin_id, github_owner, github_repo, use_semver, last_updated "+ "FROM projects "+ "WHERE group_id = $1 AND artifact_id = $2;", c.GroupID, c.ArtifactID).Scan(&projectID, &p.Name, &p.PluginID, &p.GitHub.Owner, &p.GitHub.Repo, &useSemVer, &lastUpdated) if err != nil { if err == sql.ErrNoRows { return httperror.NotFound("Unknown project") } return httperror.InternalError("Database error (failed to lookup project)", err) } if a.Start.After(lastUpdated) { lastUpdated = a.Start } setLastModified(ctx, lastUpdated) if !modifiedSince(ctx, lastUpdated) { return nil } // Get build types rows, err := a.DB.Query("SELECT build_type_id, name FROM build_types "+ "JOIN project_build_types USING(build_type_id) WHERE project_id = $1;", projectID) if err != nil { return httperror.InternalError("Database error (failed to lookup build types)", err) } for rows.Next() { bt := new(buildType) var name string err = rows.Scan(&bt.id, &name) if err != nil { return httperror.InternalError("Database error (failed to read build type)", err) } p.BuildTypes[name] = bt } // Get latest download for each build type rows, err = a.DB.Query("SELECT build_type_id, label, download_id, version FROM downloads "+ "WHERE (build_type_id, coalesce(label, ''), published) IN ("+ "SELECT build_type_id, coalesce(label, ''), MAX(published) FROM downloads "+ "WHERE project_id = $1 GROUP BY build_type_id, label)"+ "ORDER BY published DESC;", projectID) if err != nil { return httperror.InternalError("Database error (failed to get latest downloads)", err) } downloadIDs := make([]int64, 0, len(p.BuildTypes)) rows: for rows.Next() { var buildTypeID, downloadID int var version string var label *string err = rows.Scan(&buildTypeID, &label, &downloadID, &version) if err != nil { return httperror.InternalError("Database error (failed to read latest download)", err) } for _, bt := range p.BuildTypes { if bt.id == buildTypeID { build := &build{ id: downloadID, Version: version, Dependencies: make(map[string]string), } if label == nil { if bt.Latest == nil { bt.Latest = build } } else if *label == "recommended" { bt.Recommended = build if bt.Latest == nil { bt.Latest = build // Use recommended as fallback for latest } } downloadIDs = append(downloadIDs, int64(downloadID)) continue rows } } return httperror.InternalError("Found unknown build type ID", nil) } // Get dependencies for latest builds rows, err = a.DB.Query("SELECT * FROM dependencies WHERE download_ID = ANY($1);", pq.Array(downloadIDs)) if err != nil { return httperror.InternalError("Database error (failed to get latest dependencies)", err) } for rows.Next() { var downloadID int var name, version string err = rows.Scan(&downloadID, &name, &version) if err != nil { return httperror.InternalError("Database error (failed to read latest dependency)", err) } for _, bt := range p.BuildTypes { switch { case bt.Latest != nil && bt.Latest.id == downloadID: bt.Latest.Dependencies[name] = version case bt.Recommended != nil && bt.Recommended.id == downloadID: bt.Recommended.Dependencies[name] = version } } } // Get all available dependencies rows, err = a.DB.Query("SELECT DISTINCT name, split_part(dependencies.version, '-', 1) FROM dependencies "+ "JOIN downloads USING(download_id) WHERE project_id = $1;", projectID) if err != nil { return httperror.InternalError("Database error (failed to lookup dependency versions)", err) } for rows.Next() { var name, version string err = rows.Scan(&name, &version) if err != nil { return httperror.InternalError("Database error (failed to read dependency version)", err) } p.Dependencies[name] = append(p.Dependencies[name], version) } for _, deps := range p.Dependencies { sort.Sort(deps) } if useSemVer { // Add all versions rows, err = a.DB.Query("SELECT DISTINCT split_part(version, '-', 1) FROM downloads "+ "WHERE project_id = $1;", projectID) if err != nil { return httperror.InternalError("Database error (failed to lookup versions)", err) } for rows.Next() { var version string err = rows.Scan(&version) if err != nil { return httperror.InternalError("Database error (failed to read version)", err) } p.Versions = append(p.Versions, version) } sort.Sort(p.Versions) } ctx.JSON(http.StatusOK, p) return nil }
a07061625/jilibs
mpf/api/qcloud/util.go
/** * Created by GoLand. * User: 姜伟 * Date: 2020/1/2 0002 * Time: 9:53 */ package qcloud import ( "encoding/base64" "strconv" "time" "github.com/a07061625/gompf/mpf" "github.com/a07061625/gompf/mpf/api" "github.com/clbanning/mxj" ) type utilQCloud struct { api.UtilAPI } // 生成权限策略签名 func (util *utilQCloud) CreatePolicySign(policyConfig map[string]interface{}) map[string]string { nowTime := time.Now().Unix() endTime := nowTime + 259200 conf := NewConfig().GetCos() result := make(map[string]string) result["q-sign-algorithm"] = "sha1" result["q-ak"] = conf.GetSecretId() result["q-key-time"] = strconv.FormatInt(nowTime, 10) + ";" + strconv.FormatInt(endTime, 10) policyInfo := make(map[string]interface{}) et := time.Unix(int64(endTime), 0) policyInfo["expiration"] = et.Format("2006-01-02T03:04:05.000Z") policyInfo["conditions"] = policyConfig policy := mpf.JSONMarshal(policyInfo) result["policy"] = base64.StdEncoding.EncodeToString([]byte(policy)) policySign := mpf.HashSha1(policy, "") signKey := mpf.HashSha1(result["q-key-time"], conf.GetSecretKey()) result["q-signature"] = mpf.HashSha1(policySign, signKey) return result } func (util *utilQCloud) SendCosRequest(service api.IAPIOuter, errorCode uint) api.APIResult { resp, result := util.SendOuter(service, errorCode) if result.Code > 0 { return result } saveRes := make(map[string]interface{}) saveRes["code"] = resp.StatusCode saveRes["headers"] = resp.Headers if (resp.ContentLength == 0) || (resp.Headers["Content-Type"] != "application/xml") { saveRes["content"] = resp.Content result.Data = saveRes return result } xmlData, _ := mxj.NewMapXml(resp.Body) _, ok := xmlData["Error"] if ok { errInfo := xmlData["Error"].(map[string]interface{}) result.Code = errorCode result.Msg = errInfo["Message"].(string) } else { saveRes["content"] = xmlData result.Data = saveRes } return result } var ( insUtil *utilQCloud ) func init() { insUtil = &utilQCloud{api.NewUtilAPI()} } func NewUtil() *utilQCloud { return insUtil }
sauce-archives/visual-scripting
org.testobject.commons/imaging/src/main/java/org/testobject/kernel/imaging/color/palette/Palettes.java
package org.testobject.kernel.imaging.color.palette; import java.awt.Color; /** * * @author enijkamp * */ public interface Palettes { public static final int[] PALETTE_6 = Builder.colors(Color.red, Color.blue, Color.green, Color.cyan, Color.magenta, Color.yellow); public static final int[] PALETTE_3 = Builder.colors(Color.black, Color.gray, Color.white); public static final int[] PALETTE_BW = Builder.colors(Color.white, Color.black); public static class Builder { private static final int PRECESION = 4; public static int[] colors(Color ... colors) { int[] palette = new int[colors.length]; for (int i = 0; i < colors.length; i++) { palette[i] = colors[i].getRGB(); } return palette; } public static int[] spectrum(int n) { int[] palette = new int[n]; for (int i = 0; i < palette.length; i++) { float fraction = round(((float) i) / (palette.length / 6), PRECESION); float h = round(0.95f * fraction, PRECESION); Color color = Color.getHSBColor(h, 1, 1); palette[i] = color.getRGB(); } return palette; } private static float round(double valueToRound, int numberOfDecimalPlaces) { double multipicationFactor = Math.pow(10, numberOfDecimalPlaces); double interestedInZeroDPs = valueToRound * multipicationFactor; return (float) (Math.round(interestedInZeroDPs) / multipicationFactor); } public static int[] grayscale(int n) { int[] palette = new int[n]; for (int i = 0; i < palette.length; i++) { float fraction = ((float) i) / (palette.length - 1); Color color = new Color(0.9f * fraction, 0.9f * fraction, 0.9f * fraction); palette[i] = color.getRGB(); } return palette; } public static int[] gradient(int n, Color start, Color end) { int[] palette = new int[n]; for (int i = 0; i < palette.length; i++) { float fraction = ((float) i) / (palette.length - 1); float r1 = start.getRed() / 255.0F; float r2 = end.getRed() / 255.0F; float r = Math.max(0, Math.min(1, r2 * fraction + r1 * (1 - fraction))); float g1 = start.getGreen() / 255.0F; float g2 = end.getGreen() / 255.0F; float g = Math.max(0, Math.min(1, g2 * fraction + g1 * (1 - fraction))); float b1 = start.getBlue() / 255.0F; float b2 = end.getBlue() / 255.0F; float b = Math.max(0, Math.min(1, b2 * fraction + b1 * (1 - fraction))); Color color = new Color(r, g, b); palette[i] = color.getRGB(); } return palette; } } }
fletchgraham/colosseum
tests/web_platform/CSS2/normal_flow/test_inline_non_replaced_width.py
<filename>tests/web_platform/CSS2/normal_flow/test_inline_non_replaced_width.py from tests.utils import W3CTestCase class TestInlineNonReplacedWidth(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'inline-non-replaced-width-'))
itastro/mycode
blstation-master/blstation-interface/src/main/java/com/bl/station/service/News/NewService.java
<reponame>itastro/mycode package com.bl.station.service.News; import com.bl.station.entity.News; import com.bl.station.page.PageInfo; import com.bl.station.page.PageParam; import com.bl.station.param.NewsParam; import com.bl.station.param.NewsSearch; import com.bl.station.utils.StationResult; public interface NewService { StationResult add(NewsParam news) throws Exception; StationResult update(NewsParam newsParam) throws Exception; StationResult delete(String ids); PageInfo<News> pageQuery(PageParam pageParam, NewsSearch newsSearch); News findOne(Integer id); PageInfo<News> findAll(PageParam pageParam); }
hlystovea/resource_planner
project/repairs/views.py
<filename>project/repairs/views.py from django.views.generic import View class GeneratePdf(View): pass
vestrel00/business-search-app-java
presentation-java-android-mvp/src/main/java/com/vestrel00/business/search/presentation/java/android/mvp/ui/business/list/presenter/BusinessListObserver.java
<filename>presentation-java-android-mvp/src/main/java/com/vestrel00/business/search/presentation/java/android/mvp/ui/business/list/presenter/BusinessListObserver.java /* * Copyright 2018 <NAME> * * 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 com.vestrel00.business.search.presentation.java.android.mvp.ui.business.list.presenter; import com.vestrel00.business.search.domain.Business; import com.vestrel00.business.search.presentation.java.android.mvp.ui.business.list.view.BusinessListView; import com.vestrel00.business.search.presentation.java.android.mvp.ui.common.presenter.AbstractLoadContentViewObserver; import com.vestrel00.business.search.presentation.java.model.BusinessModel; import com.vestrel00.business.search.presentation.java.model.mapper.ModelMapperHolder; /** * An observer that renders a list of businesses or retry/error. */ final class BusinessListObserver extends AbstractLoadContentViewObserver<BusinessListView, Business> { private final ModelMapperHolder modelMapperHolder; BusinessListObserver(BusinessListView view, ModelMapperHolder modelMapperHolder) { super(view); this.modelMapperHolder = modelMapperHolder; } @Override protected void onStart() { super.onStart(); view.removeAllBusinessesFromShowing(); } @Override public void onNext(Business business) { BusinessModel businessModel = modelMapperHolder.businessModelMapper().map(business); view.addBusinessToShow(businessModel); } @Override public void onComplete() { super.onComplete(); view.showBusinesses(); } }
togogenome/togogenome
app/models/facets/taxonomy.rb
module Facets class Taxonomy < Base def children sparql = <<-SPARQL.strip_heredoc SELECT ?target ?name (COUNT(?name) AS ?hits) WHERE { GRAPH <http://togogenome.org/graph/taxonomy_lite> { FILTER EXISTS { ?target rdfs:subClassOf ?_parent } . ?target rdfs:subClassOf <#{self.id}> . OPTIONAL { ?sub rdfs:subClassOf ?target . } } GRAPH <http://togogenome.org/graph/taxonomy> { ?target rdfs:label ?name . FILTER(LANG(?name) = "" || LANGMATCHES(LANG(?name), "en")) . } } GROUP BY ?target ?name SPARQL Taxonomy.query(sparql).map {|h| Taxonomy.new(id: h[:target].to_s, name: h[:name].to_s, hits: h[:hits].to_i) }.sort_by {|f| f.name } end class << self def graph_uri SPARQLUtil::ONTOLOGY[:taxonomy] end def root_uri 'http://identifiers.org/taxonomy/131567' end def filter "FILTER(?parent != <http://identifiers.org/taxonomy/1> && ?parent != <#{root_uri}>)" end # Facet内で文字列検索 def search(word) sparql = <<-SPARQL.strip_heredoc SELECT ?target ?name ?parent ?parent_name ?step WHERE { { SELECT DISTINCT ?target ?name { GRAPH <http://togogenome.org/graph/taxonomy> { SELECT ?target ?name WHERE { FILTER regex(?name, "#{word}", "i") . ?target rdfs:label ?name . FILTER(LANG(?name) = "" || LANGMATCHES(LANG(?name), "en")) . } } GRAPH <http://togogenome.org/graph/taxonomy_lite> { ?target rdfs:subClassOf ?_parent . } } LIMIT 16 } GRAPH <http://togogenome.org/graph/taxonomy_lite> { ?target rdfs:subClassOf ?parent OPTION (TRANSITIVE, T_DIRECTION 1, T_MIN(0), T_STEP("step_no") AS ?step) . } GRAPH <http://togogenome.org/graph/taxonomy> { ?parent rdfs:label ?parent_name . FILTER(LANG(?parent_name) = "" || LANGMATCHES(LANG(?parent_name), "en")) . #{filter} } } SPARQL self.query(sparql).sort_by {|b| b[:name] }.group_by {|b| b[:target] }.map {|uri, vals| sort_vals = vals.sort_by {|v| -v[:step].to_i } desc = sort_vals.map {|v| v[:parent_name] }.join(' > ') parents = sort_vals.map {|v| v[:parent] } self.new(id: uri, name: vals.first[:name], description: desc, ancestor: parents) } end end end end
hasithajayasundara/airavata-custos
custos-core-services/resource-secret-core-service/src/main/java/org/apache/custos/resource/secret/persistance/local/model/Secret.java
<reponame>hasithajayasundara/airavata-custos /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.custos.resource.secret.persistance.local.model; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.*; import java.util.Date; @Entity @Table(name = "secret") @EntityListeners(AuditingEntityListener.class) public class Secret { @Id @Column(nullable = false) private String id; @Column(nullable = false) private long tenantId; @Column(nullable = false) private String ownerId; private String type; @Column(nullable = false) private String ownerType; @Column(nullable = false) private String secretType; private String discription; @Column(nullable = false) @Temporal(TemporalType.TIMESTAMP) @CreatedDate private Date createdAt; @Column(nullable = false) @Temporal(TemporalType.TIMESTAMP) @LastModifiedDate private Date lastModifiedAt; public String getId() { return id; } public void setId(String id) { this.id = id; } public long getTenantId() { return tenantId; } public void setTenantId(long tenantId) { this.tenantId = tenantId; } public String getOwnerId() { return ownerId; } public void setOwnerId(String ownerId) { this.ownerId = ownerId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getOwnerType() { return ownerType; } public void setOwnerType(String ownerType) { this.ownerType = ownerType; } public String getSecretType() { return secretType; } public void setSecretType(String secretType) { this.secretType = secretType; } public String getDiscription() { return discription; } public void setDiscription(String discription) { this.discription = discription; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public Date getLastModifiedAt() { return lastModifiedAt; } public void setLastModifiedAt(Date lastModifiedAt) { this.lastModifiedAt = lastModifiedAt; } }
outrofelipe/Python-para-zumbis
exercicios-e-exemplos/consoantes.py
<reponame>outrofelipe/Python-para-zumbis n = int(input("Informe a quantidade de caracteres: ")) caracteres = [] consoantes = 0 i = 1 while i <= n: c = input("Informe o %d caracter: " %i) caracteres.append(c) i += 1 i = 0 while i < n: if caracteres[i] not in "aeiou": consoantes += 1 i += 1 print("O total de consoantes eh: ", consoantes)
hchiam/javascriptSandbox
more-like-interview-questions/compareVersion.js
<filename>more-like-interview-questions/compareVersion.js /* eslint-disable require-jsdoc */ const compareVersion = (version1, version2) => { const v1 = version1.split('.'); const v2 = version2.split('.'); const maxLength = Math.max(v1.length, v2.length); v1.length = maxLength; v2.length = maxLength; for (let i = 0; i < maxLength; i++) { let no0v1 = v1[i]; if (no0v1 && no0v1.length > 1) { no0v1 = no0v1.replace(/^0+/g, ''); } else if (!no0v1) { no0v1 = 0; } let no0v2 = v2[i]; if (no0v2 && no0v2.length > 1) { no0v2 = no0v2.replace(/^0+/g, ''); } else if (!no0v2) { no0v2 = 0; } if (parseInt(no0v1) > parseInt(no0v2)) return 1; if (parseInt(no0v1) < parseInt(no0v2)) return -1; } return 0; }; function solutionWrapper(version1, version2) { return compareVersion(version1, version2); } // function TreeNode(val) { // this.val = val; // this.left = this.right = null; // } module.exports = { solutionWrapper, };
waldyrious/cosmopolitan
test/libc/dns/parseresolvconf_test.c
<gh_stars>1-10 /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞══════════════════════════════════════════════════════════════════════════════╡ │ Copyright 2020 <NAME> │ │ │ │ Permission to use, copy, modify, and/or distribute this software for │ │ any purpose with or without fee is hereby granted, provided that the │ │ above copyright notice and this permission notice appear in all copies. │ │ │ │ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │ │ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │ │ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │ │ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │ │ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │ │ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/dns/dns.h" #include "libc/dns/hoststxt.h" #include "libc/dns/resolvconf.h" #include "libc/mem/mem.h" #include "libc/sock/sock.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/sysv/consts/af.h" #include "libc/testlib/testlib.h" static const char *FormatIp(struct sockaddr_in *ip) { static char g_ipbuf[16]; return inet_ntop(ip->sin_family, &ip->sin_addr.s_addr, g_ipbuf, 16); } TEST(parseresolvconf, testEmpty) { struct ResolvConf *rv = calloc(1, sizeof(struct ResolvConf)); FILE *f = fmemopen(NULL, BUFSIZ, "r+"); ASSERT_EQ(0, parseresolvconf(rv, f)); ASSERT_EQ(0, rv->nameservers.i); freeresolvconf(&rv); fclose(f); } TEST(parseresolvconf, testCorrectlyTokenizes) { const char kInput[] = "# this is a comment\n" "nameserver 203.0.113.2 \n" " nameserver 203.0.113.1\n"; struct ResolvConf *rv = calloc(1, sizeof(struct ResolvConf)); FILE *f = fmemopen(kInput, strlen(kInput), "r+"); ASSERT_EQ(2, parseresolvconf(rv, f)); ASSERT_EQ(2, rv->nameservers.i); EXPECT_EQ(AF_INET, rv->nameservers.p[0].sin_family); EXPECT_EQ(DNS_PORT, ntohs(rv->nameservers.p[0].sin_port)); EXPECT_STREQ("203.0.113.2", FormatIp(&rv->nameservers.p[0])); EXPECT_EQ(AF_INET, rv->nameservers.p[1].sin_family); EXPECT_EQ(DNS_PORT, ntohs(rv->nameservers.p[1].sin_port)); EXPECT_STREQ("203.0.113.1", FormatIp(&rv->nameservers.p[1])); freeresolvconf(&rv); fclose(f); } TEST(parseresolvconf, testMulticastDnsThing_getsIgnored) { const char kInput[] = "search local # boop\n"; struct ResolvConf *rv = calloc(1, sizeof(struct ResolvConf)); FILE *f = fmemopen(NULL, BUFSIZ, "r+"); ASSERT_EQ(strlen(kInput), fwrite(kInput, 1, strlen(kInput), f)); ASSERT_EQ(0, parseresolvconf(rv, f)); ASSERT_EQ(0, rv->nameservers.i); freeresolvconf(&rv); fclose(f); }
dram/metasfresh
backend/de.metas.adempiere.adempiere/base/src/main/java/org/compiere/grid/CTableColumns2GridTabSynchronizer.java
<filename>backend/de.metas.adempiere.adempiere/base/src/main/java/org/compiere/grid/CTableColumns2GridTabSynchronizer.java<gh_stars>1000+ package org.compiere.grid; /* * #%L * de.metas.adempiere.adempiere.base * %% * Copyright (C) 2015 metas GmbH * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 2 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/gpl-2.0.html>. * #L% */ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.swing.event.ChangeEvent; import javax.swing.event.ListSelectionEvent; import javax.swing.event.TableColumnModelEvent; import javax.swing.event.TableColumnModelListener; import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; import org.compiere.model.GridField; import org.compiere.model.GridFieldVO; import org.compiere.model.GridTab; import org.compiere.swing.CTable; import org.compiere.swing.CTable.ITableColumnWidthCallback; import de.metas.util.Check; /** * Synchronize {@link TableColumn} settings with {@link GridFieldVO} settings. * * @author tsa * @task http://dewiki908/mediawiki/index.php/05731_Spaltenbreite_persitieren_%28103033707449%29 */ public class CTableColumns2GridTabSynchronizer { private static final String ATTR_CTableColumnPersistenceListener = CTableColumns2GridTabSynchronizer.class.getName(); public static CTableColumns2GridTabSynchronizer get(final CTable table) { if (table == null) { return null; } final CTableColumns2GridTabSynchronizer listener = (CTableColumns2GridTabSynchronizer)table.getClientProperty(ATTR_CTableColumnPersistenceListener); return listener; } public static CTableColumns2GridTabSynchronizer setup(final CTable table, final GridTab gridTab) { if (get(table) != null) { throw new IllegalStateException("There is already an " + CTableColumns2GridTabSynchronizer.class + " registered for " + table); } final CTableColumns2GridTabSynchronizer listener = new CTableColumns2GridTabSynchronizer(table, gridTab); table.putClientProperty(ATTR_CTableColumnPersistenceListener, listener); return listener; } private final CTable table; private final GridTab gridTab; private boolean enabled = false; private final PropertyChangeListener onTableColumnChangedListener = new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { final TableColumn column = (TableColumn)evt.getNewValue(); if (column == null) { return; } saveTableColumn(column); } }; private final ITableColumnWidthCallback tableColumnFixedWidthCallback = new ITableColumnWidthCallback() { @Override public int getWidth(TableColumn column) { final GridField gridField = getGridField(column); if (gridField == null) { return -1; } final GridFieldVO gridFieldVO = gridField.getVO(); final int width = gridFieldVO.getLayoutConstraints().getColumnDisplayLength(); if (width <= 0) { return -1; } return width; } }; private final TableColumnModelListener tableColumnModelListener = new TableColumnModelListener() { @Override public void columnAdded(TableColumnModelEvent e) { } @Override public void columnMarginChanged(ChangeEvent e) { final CTable table = getTable(); final TableColumn column = table.getTableHeader().getResizingColumn(); if (column == null) { return; } saveTableColumn(column); } @Override public void columnMoved(TableColumnModelEvent e) { final int indexFrom = e.getFromIndex(); final int indexTo = e.getToIndex(); saveColumnMoved(indexFrom, indexTo); } @Override public void columnRemoved(TableColumnModelEvent e) { } @Override public void columnSelectionChanged(ListSelectionEvent e) { } }; private CTableColumns2GridTabSynchronizer(final CTable table, final GridTab gridTab) { super(); Check.assumeNotNull(table, "table not null"); this.table = table; Check.assumeNotNull(gridTab, "gridTab not null"); this.gridTab = gridTab; table.setTableColumnFixedWidthCallback(tableColumnFixedWidthCallback); setEnabled(true); loadFromGridTab(); } public void setEnabled(final boolean enabled) { if (this.enabled == enabled) { return; } final TableColumnModel columnModel = table.getColumnModel(); // // First, remove the listeners anyway to make sure we are not adding them twice columnModel.removeColumnModelListener(tableColumnModelListener); table.removePropertyChangeListener(CTable.PROPERTY_TableColumnChanged, onTableColumnChangedListener); // // If Enabled, add the listeners if (enabled) { columnModel.addColumnModelListener(tableColumnModelListener); table.addPropertyChangeListener(CTable.PROPERTY_TableColumnChanged, onTableColumnChangedListener); } this.enabled = enabled; } public boolean isEnabled() { return enabled; } /** * Execute <code>runnable</code> with all listeners disabled * * @param runnable */ private void runDisabled(final Runnable runnable) { final boolean enabledOld = isEnabled(); setEnabled(false); try { runnable.run(); } finally { setEnabled(enabledOld); } } public CTable getTable() { return table; } public void saveToGridTab() { runDisabled(new Runnable() { @Override public void run() { saveToGridTab0(); } }); } private void saveToGridTab0() { final GridTab gridTab = getGridTab(); if (gridTab == null) { return; } // // Save column attributes final TableColumnModel tcm = table.getColumnModel(); for (int i = 0; i < tcm.getColumnCount(); i++) { final TableColumn column = tcm.getColumn(i); saveTableColumn(column); } // // Save column sequence numbers saveColumnSeqNo(); } /** * Save {@link TableColumn} status to {@link GridTab}. * * NOTE: SeqNo is not saved. * * @param column */ private void saveTableColumn(final TableColumn column) { final GridField gridField = getGridField(column); if (gridField == null) { return; } final boolean visible = table.isColumnVisible(column); final GridFieldVO gridFieldVO = gridField.getVO(); gridFieldVO.setIsDisplayedGrid(visible); if (visible) { gridFieldVO.getLayoutConstraints().setColumnDisplayLength(column.getWidth()); } } /** * Loads table column settings from given <code>gridField</code>. * * NOTE: SeqNo is not loaded * * @param tableColumn * @param gridField */ private void loadTableColumn(final TableColumn tableColumn, final GridField gridField) { runDisabled(new Runnable() { @Override public void run() { loadTableColumn0(tableColumn, gridField); } }); } private void loadTableColumn0(final TableColumn tableColumn, final GridField gridField) { // // No GridField associated with tableColumn => hide column if (gridField == null) { table.setColumnVisibility(tableColumn, false); return; } // // Load TableColumn properties from GridField final GridFieldVO gridFieldVO = gridField.getVO(); final int width = gridFieldVO.getLayoutConstraints().getColumnDisplayLength(); if (width > 0) { tableColumn.setPreferredWidth(width); } final boolean visible = gridFieldVO.isDisplayedGrid(); table.setColumnVisibility(tableColumn, visible); } private void saveColumnMoved(final int indexFrom, final int indexTo) { if (indexFrom == indexTo) { // nothing changed return; } saveColumnSeqNo(); } /** * Save columns sequence number to {@link GridFieldVO}s. */ private void saveColumnSeqNo() { final GridTab mTab = getGridTab(); if (mTab == null) { return; } final TableColumnModel tcm = table.getColumnModel(); final int columnCount = tcm.getColumnCount(); int nextSeqNo = 10; for (int i = 0; i < columnCount; i++) { final TableColumn column = tcm.getColumn(i); final GridField gridField = getGridField(column); if (gridField == null) { continue; } final GridFieldVO gridFieldVO = gridField.getVO(); final int seqNo; if (table.isColumnVisible(column) && gridFieldVO.isDisplayedGrid()) { seqNo = nextSeqNo; nextSeqNo += 10; } else { seqNo = 0; } gridFieldVO.setSeqNoGrid(seqNo); } } public GridTab getGridTab() { return gridTab; } private GridField getGridField(final TableColumn column) { final GridTab mTab = getGridTab(); if (mTab == null) { return null; } final String columnName = getColumnName(column); if (columnName == null) { return null; } final GridField gridField = mTab.getField(columnName); return gridField; } private String getColumnName(final TableColumn column) { if (column == null) { return null; } if (column.getIdentifier() == null) { return null; } final String columnName = column.getIdentifier().toString(); if (Check.isEmpty(columnName, true)) { return null; } return columnName; } /** * Load {@link TableColumn} status from {@link GridTab} */ private void loadFromGridTab() { runDisabled(new Runnable() { @Override public void run() { loadFromGridTab0(); } }); } private void loadFromGridTab0() { final GridTab mTab = getGridTab(); if (mTab == null) { return; } // // Get GridFields and sort them by SeqNoGrid final GridField[] gridFields = mTab.getFields(); // NOTE: returns a copy Arrays.sort(gridFields, new Comparator<GridField>() { @Override public int compare(GridField o1, GridField o2) { if (o1 == o2) { return 0; } final GridFieldVO vo1 = o1.getVO(); final GridFieldVO vo2 = o2.getVO(); final int seqNo1 = vo1.isDisplayedGrid() && vo1.getSeqNoGrid() > 0 ? vo1.getSeqNoGrid() : Integer.MAX_VALUE; final int seqNo2 = vo2.isDisplayedGrid() && vo2.getSeqNoGrid() > 0 ? vo2.getSeqNoGrid() : Integer.MAX_VALUE; return seqNo1 - seqNo2; } }); // // From GridTab's fields // Build map: ColumnName to GridField // Build list: visible columnNames final Map<String, GridField> columnName2GridField = new HashMap<String, GridField>(gridFields.length); final List<String> visibleColumnNames = new ArrayList<String>(gridFields.length); for (int i = 0; i < gridFields.length; i++) { final GridField gridField = gridFields[i]; final GridFieldVO gridFieldVO = gridField.getVO(); final String columnName = gridField.getColumnName(); columnName2GridField.put(columnName, gridField); final boolean visible = gridFieldVO.isDisplayedGrid(); if (visible) { visibleColumnNames.add(columnName); } } // // From Table's column model // Load column from GridField final TableColumnModel tableColumnModel = table.getColumnModel(); final int tableColumnsCount = tableColumnModel.getColumnCount(); for (int i = 0; i < tableColumnsCount; i++) { final TableColumn column = tableColumnModel.getColumn(i); final String columnName = getColumnName(column); // Update final GridField gridField = columnName2GridField.get(columnName); loadTableColumn(column, gridField); } // // Reorder table's columns based on GridField settings int currentIdx = 0; final int visibleFieldsCount = visibleColumnNames.size(); for (final String columnName : visibleColumnNames) { if (currentIdx == visibleFieldsCount - 1) { // no reordering for the last one (see javadoc of 'tcm.moveColumn') continue; } // Search where our column is now int fromIdx = -1; for (int i = currentIdx; i < tableColumnsCount; i++) { final TableColumn column = tableColumnModel.getColumn(i); final String fromColumnName = getColumnName(column); if (columnName.equals(fromColumnName)) { fromIdx = i; break; } } // Move column if (fromIdx != currentIdx) { tableColumnModel.moveColumn(fromIdx, currentIdx); } currentIdx++; } } }
brikkho-net/okta-signin-widget
test/unit/spec/VerifyPIV_spec.js
/* eslint max-params: [2, 18], max-statements: 0 */ define([ 'okta', '@okta/okta-auth-js', 'helpers/mocks/Util', 'helpers/dom/PivForm', 'helpers/dom/PrimaryAuthForm', 'helpers/dom/Beacon', 'helpers/util/Expect', 'LoginRouter', 'sandbox', 'helpers/xhr/PIV_error', 'helpers/xhr/PIV_POST', 'helpers/xhr/PIV_GET' ], function (Okta, OktaAuth, Util, PivForm, PrimaryAuthForm, Beacon, Expect, Router, $sandbox, resError, resPost, resGet) { var SharedUtil = Okta.internal.util.Util; var { _ } = Okta; var itp = Expect.itp; function setup (errorResponse, pivConfig) { var setNextResponse = Util.mockAjax(); var baseUrl = 'https://foo.com'; var authClient = new OktaAuth({issuer: baseUrl}); var successSpy = jasmine.createSpy('success'); var afterErrorHandler = jasmine.createSpy('afterErrorHandler'); var defaultConfig = { certAuthUrl: 'https://foo.com', isCustomDomain: true }; var router = new Router(_.extend({ el: $sandbox, baseUrl: baseUrl, authClient: authClient, globalSuccessFn: successSpy, relayState: '%2Fapp%2FUserHome', piv: pivConfig || defaultConfig, })); var form = new PivForm($sandbox); var loginForm = new PrimaryAuthForm($sandbox); var beacon = new Beacon($sandbox); router.on('afterError', afterErrorHandler); Util.registerRouter(router); Util.mockRouterNavigate(router); spyOn(SharedUtil, 'redirect'); setNextResponse(errorResponse ? [errorResponse] : [resGet, resPost]); Util.resetAjaxRequests(); router.verifyPIV(); return Expect.waitForVerifyPIV({ router: router, form: form, loginForm: loginForm, beacon: beacon, ac: authClient, setNextResponse: setNextResponse, successSpy: successSpy, afterErrorHandler: afterErrorHandler }); } function deepClone (res) { return JSON.parse(JSON.stringify(res)); } Expect.describe('PIV', function () { Expect.describe('General', function () { itp('displays the correct beacon', function () { return setup().then(function (test) { expect(test.beacon.isPIVBeacon()).toBe(true); expect(test.beacon.hasClass('smartcard')).toBe(true); }); }); itp('displays the correct title', function () { return setup().then(function (test) { expect(test.form.titleText()).toBe('PIV / CAC card'); }); }); itp('has a "back" link in the footer', function () { return setup().then(function (test) { Expect.isVisible(test.form.backLink()); }); }); itp('has spinning wait icon', function () { return setup().then(function (test) { Expect.isVisible(test.form.spinningIcon()); Expect.isNotVisible(test.form.submitButton()); }); }); itp('displays the correct instructions', function () { return setup().then(function (test) { expect(test.form.instructions()) .toBe('Please insert your PIV / CAC card and select the user certificate.'); }); }); itp('makes ajax get and post calls with correct data', function () { return setup().then(function () { return Expect.waitForSpyCall(SharedUtil.redirect); }).then(function () { expect(Util.numAjaxRequests()).toBe(2); var argsForGet = Util.getAjaxRequest(0); expect(argsForGet.url).toBe('https://foo.com'); expect(argsForGet.method).toBe('GET'); var argsForPost = Util.getAjaxRequest(1); expect(argsForPost.url).toBe('https://foo.com'); expect(argsForPost.method).toBe('POST'); expect(JSON.parse(argsForPost.params)).toEqual({ fromURI: '%2Fapp%2FUserHome', isCustomDomain: true }); }); }); itp('makes post call with correct data when isCustomDomain is false', function () { var config = { certAuthUrl: 'https://foo.com', isCustomDomain: false }; return setup(null, config).then(function () { return Expect.waitForSpyCall(SharedUtil.redirect); }).then(function () { expect(Util.numAjaxRequests()).toBe(2); var argsForPost = Util.getAjaxRequest(1); expect(JSON.parse(argsForPost.params)).toEqual({ fromURI: '%2Fapp%2FUserHome', isCustomDomain: false }); }); }); itp('makes post call with correct data when isCustomDomain is undefined', function () { var config = { certAuthUrl: 'https://foo.com', isCustomDomain: undefined }; return setup(null, config).then(function () { return Expect.waitForSpyCall(SharedUtil.redirect); }).then(function () { expect(Util.numAjaxRequests()).toBe(2); var argsForPost = Util.getAjaxRequest(1); expect(JSON.parse(argsForPost.params)).toEqual({ fromURI: '%2Fapp%2FUserHome' }); }); }); itp('redirects on successful cert auth', function () { return setup().then(function () { return Expect.waitForSpyCall(SharedUtil.redirect); }).then(function () { expect(SharedUtil.redirect).toHaveBeenCalledWith('https://rain.okta1.com/login/sessionCookieRedirect?redirectUrl=%2Fapp%2FUserHome&amp;token=<PASSWORD>'); }); }); }); Expect.describe('Error', function () { var pivError = deepClone(resError); itp('shows error box with error response', function () { return setup(pivError).then(function (test) { return Expect.waitForFormError(test.form, test); }).then(function (test) { expect(test.form.hasErrors()).toBe(true); expect(test.form.errorBox()).toHaveLength(1); expect(test.form.errorMessage()).toEqual('Invalid certificate.'); }); }); itp('displays retry button', function () { return setup(pivError).then(function (test) { return Expect.waitForFormError(test.form, test); }).then(function (test) { Expect.isVisible(test.form.submitButton()); Expect.isNotVisible(test.form.spinningIcon()); }); }); itp('can retry authentication', function () { return setup(pivError).then(function (test) { return Expect.waitForFormError(test.form, test); }).then(function (test) { test.setNextResponse([resGet, resPost]); test.form.submit(); return Expect.waitForSpyCall(SharedUtil.redirect); }).then(function () { expect(SharedUtil.redirect).toHaveBeenCalledWith( 'https://rain.okta1.com/login/sessionCookieRedirect?redirectUrl=%2Fapp%2FUserHome&amp;token=<PASSWORD>' ); }); }); itp('shows generic error message for undefined error response', function () { var res = deepClone(resError); res.response = undefined; return setup(res).then(function (test) { return Expect.waitForFormError(test.form, test); }).then(function (test) { expect(test.form.hasErrors()).toBe(true); expect(test.form.errorBox()).toHaveLength(1); expect(test.form.errorMessage()) .toEqual('There was an error signing in. Click the button below to try again.'); }); }); itp('shows generic error message for empty text error response', function () { var res = deepClone(resError); res.responseType = 'text'; res.response = ''; return setup(res).then(function (test) { return Expect.waitForFormError(test.form, test); }).then(function (test) { expect(test.form.hasErrors()).toBe(true); expect(test.form.errorBox()).toHaveLength(1); expect(test.form.errorMessage()) .toEqual('There was an error signing in. Click the button below to try again.'); }); }); itp('shows correct error message for text error response', function () { var res = deepClone(resError); res.responseType = 'text'; res.response = '{"errorCode":"E0000004","errorSummary":"Authentication failed","errorLink":"E0000004","errorId":"oaeDtg9knyJR7agwMN-70SYgw","errorCauses":[]}'; return setup(res).then(function (test) { return Expect.waitForFormError(test.form, test); }).then(function (test) { expect(test.form.hasErrors()).toBe(true); expect(test.form.errorBox()).toHaveLength(1); expect(test.form.errorMessage()).toEqual('Authentication failed'); }); }); }); }); });
Anlon-Burke/vespa
documentapi/src/main/java/com/yahoo/documentapi/VisitorDataHandler.java
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.documentapi; import com.yahoo.document.Document; import com.yahoo.document.DocumentId; import com.yahoo.documentapi.messagebus.protocol.*; import com.yahoo.messagebus.Message; import com.yahoo.vdslib.SearchResult; import com.yahoo.vdslib.DocumentSummary; import com.yahoo.document.BucketId; import java.util.List; /** * A data handler is a class that handles responses from a visitor. * Different clients might want different interfaces. * Some might want a callback interface, some might want a polling interface. * Some want good control of acking, while others just want something simple. * <p> * Use a data handler that fits your needs to be able to use visiting easily. * * @author <NAME> */ public abstract class VisitorDataHandler { protected VisitorControlSession session; /** Creates a new visitor data handler. */ public VisitorDataHandler() { } /** * Called before the visitor starts. Override this method if you need * to reset local data. Remember to call the superclass' method as well. */ public void reset() { session = null; } /** * Sets which session this visitor data handler belongs to. This is done by * the session itself and should not be called manually. The session is * needed for ack to work. * * @param session the session currently using this data handler */ public void setSession(VisitorControlSession session) { this.session = session; } /** * Returns the next response of this session. This method returns * immediately. * * @return the next response, or null if no response is ready at this time * @throws UnsupportedOperationException if data handler does not support * the operation */ public VisitorResponse getNext() { throw new UnsupportedOperationException("This datahandler doesn't support polling"); } /** * Returns the next response of this session. This will block until a * response is ready or the given timeout is reached. * * @param timeoutMilliseconds the max time to wait for a response. If the * number is 0, this will block without any * timeout limit * @return the next response, or null if no response becomes ready before * the timeout expires * @throws InterruptedException if this thread is interrupted while waiting * @throws UnsupportedOperationException if data handler does not support * the operation */ public VisitorResponse getNext(int timeoutMilliseconds) throws InterruptedException { throw new UnsupportedOperationException("This datahandler doesn't support polling"); } /** * Called when visiting is done, to notify clients waiting on getNext(). */ public void onDone() {} /** * Called when a data message is received. * * IMPORTANT: * May be called concurrently from multiple threads. Any internal state * mutations MUST be done in a thread-safe manner. * * @param m The message received * @param token A token to reply with when finished processing the message. */ public abstract void onMessage(Message m, AckToken token); /** * Function used to ack data. You need to ack data periodically, as storage * will halt visiting when it has too much client requests pending. * * @param token The token to ack. Gotten from an earlier callback. */ public void ack(AckToken token) { session.ack(token); } }
JSNavas/CursoPython2.7
21. generadores.py
lista = ["bienvenido "] ciclo = (c * 4 for c in lista) print ciclo print ciclo.next() for cadena in ciclo: print cadena print n = input("Factorial de: ") def factorial(n): i = 1 while n > 1: i = n * i yield i n -= 1 for fact in factorial(n): print fact
sejoung/codeTestJDK8
src/main/java/com/github/sejoung/codetest/annotation/markerinterface/Developer.java
<filename>src/main/java/com/github/sejoung/codetest/annotation/markerinterface/Developer.java package com.github.sejoung.codetest.annotation.markerinterface; public interface Developer { }
carpyncho/yeolde_carpyncho
carpyncho2/carpyncho/steps/read_tile.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from corral import run, db from ..models import Tile, MasterSource class ReadTile(run.Step): model = Tile conditions = [model.status == "measured"] procno = 3 groups = ["read"] production_procno = 1 @classmethod def class_setup(cls): def chunk_it(seq, num): avg = len(seq) / float(num) out = [] last = 0.0 while last < len(seq): out.append(seq[int(last):int(last + avg)]) last += avg return sorted(out, reverse=True) with db.session_scope() as session: all_ids = tuple( r[0] for r in session.query(cls.model.id).filter(*cls.conditions)) db.engine.dispose() cls.chunks = chunk_it(all_ids, cls.get_procno()) def setup(self): self.buff = [] def generate(self): if not self.chunks: return () ids = self.chunks[self.current_proc] if not ids: return () query = self.session.query(self.model).filter(self.model.id.in_(ids)) return query def validate(self, obj): assert isinstance(obj, (dict, db.Model)) def save(self, obj): if isinstance(obj, dict): self.buff.append(obj) else: super(ReadTile, self).save(obj) def update_tile(self, tile): if self.buff: self.session.bulk_insert_mappings(MasterSource, self.buff) tile.data_readed = tile.data_readed + len(self.buff) self.buff = [] self.session.commit() def process(self, tile): offset = tile.data_readed for order, src in enumerate(tile.data[offset:], offset): srcdict = dict( tile_id=tile.id, order=order, ra_h=src[0], dec_h=src[1], ra_j=src[2], dec_j=src[3], ra_k=src[4], dec_k=src[5]) yield srcdict if len(self.buff) >= 5000: self.update_tile(tile) else: self.update_tile(tile) tile.data_readed = tile.data_size tile.status = "loaded"
wied03/ansible-ruby
lib/ansible/ruby/modules/generated/cloud/amazon/cloudformation_facts.rb
# frozen_string_literal: true # See LICENSE.txt at root of repository # GENERATED FILE - DO NOT EDIT!! require 'ansible/ruby/modules/base' module Ansible module Ruby module Modules # Gets information about an AWS CloudFormation stack class Cloudformation_facts < Base # @return [String, nil] The name or id of the CloudFormation stack. Gathers facts for all stacks by default. attribute :stack_name validates :stack_name, type: String # @return [String, nil] Get all stack information for the stack attribute :all_facts validates :all_facts, type: String # @return [String, nil] Get stack events for the stack attribute :stack_events validates :stack_events, type: String # @return [String, nil] Get stack template body for the stack attribute :stack_template validates :stack_template, type: String # @return [String, nil] Get stack resources for the stack attribute :stack_resources validates :stack_resources, type: String # @return [String, nil] Get stack policy for the stack attribute :stack_policy validates :stack_policy, type: String end end end end
apache/aries-old
subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/BundleArchiveBuilder.java
package org.apache.aries.subsystem.itests.util; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import org.ops4j.pax.tinybundles.core.InnerClassStrategy; import org.ops4j.pax.tinybundles.core.TinyBundle; import org.ops4j.pax.tinybundles.core.TinyBundles; import aQute.bnd.osgi.Constants; public class BundleArchiveBuilder { public static final String JAR_EXTENSION = ".jar"; private final TinyBundle bundle; public BundleArchiveBuilder() { bundle = TinyBundles.bundle(); } public BundleArchiveBuilder activator(Class<?> clazz) { bundle.set(Constants.BUNDLE_ACTIVATOR, clazz.getName()); bundle.add(clazz, InnerClassStrategy.NONE); return this; } public InputStream build() { return bundle.build(); } public byte[] buildAsBytes() throws IOException { InputStream is = build(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] bytes = new byte[2048]; int count; while ((count = is.read(bytes)) != -1) { baos.write(bytes, 0, count); } is.close(); baos.close(); return baos.toByteArray(); } public BundleArchiveBuilder clazz(Class<?> clazz) { bundle.add(clazz, InnerClassStrategy.NONE); return this; } public BundleArchiveBuilder exportPackage(String value) { return header(Constants.EXPORT_PACKAGE, value); } public BundleArchiveBuilder header(String name, String value) { bundle.set(name, value); return this; } public BundleArchiveBuilder importPackage(String value) { return header(Constants.IMPORT_PACKAGE, value); } public BundleArchiveBuilder provideCapability(String value) { return header(Constants.PROVIDE_CAPABILITY, value); } public BundleArchiveBuilder requireBundle(String value) { return header(Constants.REQUIRE_BUNDLE, value); } public BundleArchiveBuilder requireCapability(String value) { return header(Constants.REQUIRE_CAPABILITY, value); } public BundleArchiveBuilder symbolicName(String value) { return header(Constants.BUNDLE_SYMBOLICNAME, value); } }
TirthrajRao/spurtV2
dist/api/repositories/stockStatusRepository.js
<filename>dist/api/repositories/stockStatusRepository.js "use strict"; /* * spurtcommerce API * version 2.1 * http://api.spurtcommerce.com * * Copyright (c) 2019 piccosoft ltd * Author piccosoft ltd <<EMAIL>> * Licensed under the MIT license. */ Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const typeorm_1 = require("typeorm"); const stockStatus_1 = require("../models/stockStatus"); let StockStatusRepository = class StockStatusRepository extends typeorm_1.Repository { }; StockStatusRepository = tslib_1.__decorate([ typeorm_1.EntityRepository(stockStatus_1.StockStatus) ], StockStatusRepository); exports.StockStatusRepository = StockStatusRepository; //# sourceMappingURL=stockStatusRepository.js.map
ivangonzalezsp/carbon
src/utils/helpers/browser/browser.js
<filename>src/utils/helpers/browser/browser.js import React from 'react'; import ReactDOM from 'react-dom'; import { keys } from 'lodash'; /** * Browser Helper * * Provides helper methods for working with Browser behavior. * */ const Browser = { isDomAvailable: () => { const _window = Browser.getWindow(); const _document = Browser.getDocument(); return (!!( typeof _window !== 'undefined' && _document && _document.createElement )); }, /** * Get the current window * * @return window */ getWindow: () => { return global.window; }, /** * Get the current document * * @return window */ getDocument: () => { return document; }, /** * Get the current activeElement * * @return HTMLElement */ getActiveElement: () => { const doc = Browser.getDocument(); return doc.activeElement; }, /** * Redirect to URL * * @method redirectTo * @param url => URL string format */ redirectTo: (url) => { Browser.getWindow().location = url; }, /** * Redirects to URL after the given number of seconds have elapsed * * @method redirectAfter * @param url => URL string format * @param seconds => the number of seconds to wait before redirecting */ redirectAfter: (url, seconds) => { return setTimeout(() => Browser.redirectTo(url), seconds * 1000); }, /** * Reload the current page * * @method reload */ reload: () => { Browser.getWindow().location.reload(); }, /** * Focuses and sets cursor of input field * * @method editFocus */ editFocus: (ref) => { const node = ReactDOM.findDOMNode(ref._input); // eslint-disable-line react/no-find-dom-node node.focus(); node.select(); }, /** * Focuses and sets cursor of react node * * @method setFocus */ setFocus: (reactNode) => { const node = ReactDOM.findDOMNode(reactNode); // eslint-disable-line react/no-find-dom-node node.focus(); }, /** * Focuses and sets cursor of input field but does not select text * * @method setInputFocus */ setInputFocus: (inputComponent) => { Browser.setFocus(inputComponent._input); }, /** * Sets a cookie where name=value * * @param {Object} options includes expires or max-age * @method setCookie */ setCookie: (name, value, options = {}) => { let cookie = `${name}=${value}`; if (options.expires) { cookie += `; expires=${options.expires}`; } if (options['max-age']) { cookie += `; max-age=${options['max-age']}`; } Browser.getDocument().cookie = cookie; }, /** * Returns a cookies value by passed name * * @param {String} name cookie name key * @method getCookieValueByName */ getCookie: (name) => { const cookies = Browser.getDocument().cookie.split(';'); for (let i = 0; i < cookies.length; i++) { const cookie = cookies[i].trim().split('='); if (cookie[0] === name) { return cookie[1]; } } return null; }, /** * Submits POST in new window * * @method postToNewWindow * @param {String} url URL to POST to * @param {Object} data Data to POST * @param {Object} target Optional target window name * @return {Void} */ postToNewWindow: (url, data, target = '_blank') => { const doc = Browser.getDocument(), containerId = 'carbonPostFormContainer'; let container = doc.getElementById(containerId); if (!container) { container = doc.createElement('div'); container.setAttribute('id', containerId); doc.body.appendChild(container); } ReactDOM.render(( <form action={ url } method='post' target={ target } > { keys(data).map((key) => { return ( <input type='hidden' key={ key } name={ key } value={ data[key] } /> ); }) } </form> ), container, function() { Browser.submitForm(this); }); ReactDOM.unmountComponentAtNode(container); }, /** * Submits a passed Form * * @method submitForm * @param {HTML Form} form to submit */ submitForm: (form) => { form.submit(); } }; export default Browser;
topdev707/typescript
tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js
<filename>tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js // Generic call with constraints infering type parameter from object member properties var C = (function () { function C() { } return C; })(); var D = (function () { function D() { } return D; })(); function foo(t, t2) { return function (x) { return t2; }; } var c; var d; var r2 = foo(d, c); var r9 = foo(function () { return 1; }, function () { }); function other() { var r5 = foo(c, d); }
databasefx/dbfx
app/src/main/java/cn/navigational/dbfx/FXMLHelper.java
package cn.navigational.dbfx; import cn.navigational.dbfx.i18n.I18N; import javafx.fxml.FXMLLoader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; /** * FXML helper * * @author yangkui * @since 1.0 */ public class FXMLHelper { private static final Logger LOG = LoggerFactory.getLogger(FXMLHelper.class); /** * Load fxml view * * @param path FXML view path */ public static <P> P loadFxml(final String path, Object controller) { var fxLoader = new FXMLLoader(); fxLoader.setResources(I18N.getBundle()); fxLoader.setController(controller); final P root; try { root = fxLoader.load(ClassLoader.getSystemResourceAsStream(path)); } catch (IOException e) { LOG.debug("Load fxml view happen error.", e); throw new RuntimeException("Load fxml view failed path=[" + path + "]."); } return root; } }
PacktPublishing/Practical-OneOps
Chapter 09/circuit-oneops-1-master/components/cookbooks/volume/recipes/add.rb
<gh_stars>1-10 # Copyright 2016, <NAME>, 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. # # volume::add # # scan for available /dev/xvd* devices from dmesg # create a physical device in LVM (pvcreate) for each # create a volume group vgcreate with the name of the platform # create a logical volume lvcreate with the name of the resource /dev/<resource> # use storage dep to gen a raid and lvm ontop if node.platform =~ /windows/ include_recipe "volume::windows_vol_add" return end storage = nil node.workorder.payLoad[:DependsOn].each do |dep| if dep["ciClassName"] =~ /Storage/ storage = dep break end end include_recipe "shared::set_provider" size = node.workorder.rfcCi.ciAttributes["size"].gsub(/\s+/, "") storage_provider = node.storage_provider_class if (storage_provider =~ /azure/) && !storage.nil? dev_id=nil device_maps = storage['ciAttributes']['device_map'].split(" ") node.set[:device_maps] = device_maps device_maps.each do |dev_vol| dev_id = dev_vol.split(":")[4] end Chef::Log.info("executing lsblk #{dev_id}") `lsblk #{dev_id}` if $?.to_i != 0 Chef::Log.info("Device NOT attached, attaching the disk now ...") include_recipe "azuredatadisk::attach" else Chef::Log.info("Device is already attached") end end package "lvm2" package "mdadm" storageUpdated = false if !storage.nil? storageUpdated = storage.ciBaseAttributes.has_key?("size") end cloud_name = node[:workorder][:cloud][:ciName] newDevicesAttached = "" mode = "no-raid" Chef::Log.info("-------------------------------------------------------------") Chef::Log.info("Volume Size : "+size ) Chef::Log.info("-------------------------------------------------------------") if size == "-1" Chef::Log.info("skipping because size = -1") return end raid_device = "/dev/md/#{node.workorder.rfcCi.ciName}" rfc_action = "#{node.workorder.rfcCi.rfcAction}" no_raid_device = " " Chef::Log.info("-------------------------------------------------------------") Chef::Log.info("Raid Device : "+raid_device) Chef::Log.info("RFC Action : "+rfc_action) Chef::Log.info("-------------------------------------------------------------") node.set["raid_device"] = raid_device platform_name = node.workorder.box.ciName logical_name = node.workorder.rfcCi.ciName cloud_name = node[:workorder][:cloud][:ciName] token_class = node[:workorder][:services][:compute][cloud_name][:ciClassName].split(".").last.downcase Chef::Log.info("storage_provider:#{storage_provider}") # need ruby block so package resource above run first ruby_block 'create-iscsi-volume-ruby-block' do block do Chef::Log.info("------------------------------------------------------") Chef::Log.info("Storage: "+storage.inspect.gsub("\n"," ")) Chef::Log.info("------------------------------------------------------") if storage.nil? Chef::Log.info("no DependsOn Storage - skipping") else dev_list = "" if node[:storage_provider_class] =~ /azure/ Chef::Log.info(" the storage device is already attached") vols = Array.new node[:device_maps].each do |dev_vol| vol_id = dev_vol.split(":")[3] dev_id = dev_vol.split(":")[4] vols.push dev_id dev_list += dev_id+" " end else provider = node[:iaas_provider] storage_provider = node[:storage_provider] instance_id = node.workorder.payLoad.ManagedVia[0]["ciAttributes"]["instance_id"] Chef::Log.info("instance_id: "+instance_id) compute = provider.servers.get(instance_id) device_maps = storage['ciAttributes']['device_map'].split(" ") vols = Array.new dev_list = "" i = 0 device_maps.each do |dev_vol| vol_id = dev_vol.split(":")[0] dev_id = dev_vol.split(":")[1] Chef::Log.info("vol_id: "+vol_id) vol = nil case token_class when /rackspace|ibm/ vol = storage_provider.volumes.get vol_id else vol = provider.volumes.get vol_id end Chef::Log.info("vol: "+ vol.inspect.gsub("\n"," ").gsub("<","").gsub(">","") ) begin case token_class when /ibm/ if vol.attached? Chef::Log.error("attached already, no way to determine device") # mdadm sometime reassembles with _0 new_raid_device = `ls -1 #{raid_device}* 2>/dev/null`.chop if new_raid_device.empty? exit 1 else raid_device = new_raid_device node.set["raid_device"] = raid_device break end end # determine new device by watching /dev because ibm (kvm) doesn't attach it to the specified device orig_device_list = `ls -1 /dev/vd*`.split("\n") compute.attach(vol.id) device_list = `ls -1 /dev/vd*`.split("\n") retry_count = 0 max_retry_count = 30 while orig_device_list.size == device_list.size && retry_count < max_retry_count do sleep 10 retry_count +=1 device_list = `ls -1 /dev/vd*`.split("\n") end if retry_count == max_retry_count exit_with_error("max retry count of "+max_retry_count.to_s+" hit ... device list: "+orig_device_list.inspect.gsub("\n"," ")) exit 1 end new_dev = nil device_list.each do |dev| found = false orig_device_list.each do |d| if dev == d found = true end end if !found new_dev = dev break end end if new_dev != nil dev_id = new_dev Chef::Log.info "device: "+dev_id node.set["raid_device"] = dev_id end when /openstack/ if vol.attachments != nil && vol.attachments.size > 0 && vol.attachments[0]["serverId"] == instance_id Chef::Log.error("attached already, no way to determine device") # mdadm sometime reassembles with _0 new_raid_device = `ls -1 #{raid_device}* 2>/dev/null`.chop non_raid_device = `ls -1 /dev/#{platform_name}/#{node.workorder.rfcCi.ciName}* 2>/dev/null`.chop if new_raid_device.empty? && non_raid_device.empty? Chef::Log.warn("Cleanup Failed Attempt ") vol.detach instance_id, vol_id exit 1 else if new_raid_device.empty? raid_device = non_raid_device no_raid_device = non_raid_device else raid_device = new_raid_device no_raid_device = new_raid_device end next end end Chef::Log.info("-------------------------------------------") Chef::Log.info("dev_id: "+dev_id) Chef::Log.info("Instance_id: "+instance_id) # determine new device by by watching /dev because openstack (kvm) doesn't attach it to the specified device orig_device_list = `ls -1 /dev/vd*`.split("\n") vol.attach instance_id, dev_id Chef::Log.info("Device Attached ......") device_list = `ls -1 /dev/vd*`.split("\n") retry_count = 0 max_retry_count = 12 while orig_device_list.size == device_list.size && retry_count < max_retry_count do sleep 15 retry_count +=1 device_list = `ls -1 /dev/vd*`.split("\n") end if retry_count == max_retry_count exit_with_error("max retry count of "+max_retry_count.to_s+" hit ... device list: "+orig_device_list.inspect.gsub("\n"," ")) end new_dev = nil device_list.each do |dev| found = false orig_device_list.each do |d| if dev == d found = true end end if !found new_dev = dev break end end if new_dev != nil dev_id = new_dev Chef::Log.info "Assigned Device: "+dev_id Chef::Log.info("-------------------------------------------") no_raid_device = dev_id end when /rackspace/ rackspace_dev_id = dev_id.gsub(/\d+/,"") is_attached = false compute.attachments.each do |a| is_attached = true if a.volume_id = vol.id end if !is_attached compute.attach_volume vol.id, rackspace_dev_id end node.set["raid_device"] = rackspace_dev_id when /ec2/ vol.device = dev_id.gsub("xvd","sd") vol.server = compute when /azure/ Chef::Log.info(" the storage device is already attached") end rescue Fog::Compute::AWS::Error=>e if e.message =~ /VolumeInUse/ Chef::Log.info("already added") else Chef::Log.info(e.inspect) exit 1 end end vols.push vol_id dev_list += dev_id+" " i+=1 end # wait until all are attached fin = false max_retry = 10 retry_count = 0 while !fin && retry_count<max_retry do fin = true vols.each do |vol_id| vol = nil if token_class =~ /rackspace|ibm/ vol = storage_provider.volumes.get vol_id else vol = provider.volumes.get vol_id end vol_state = '' if token_class =~ /openstack/ vol_state = vol.status else vol_state = vol.state end Chef::Log.info("vol: "+vol_id+" state:"+vol_state) if vol_state.downcase != "attached" && vol_state.downcase != "in-use" fin = false sleep 10 end end retry_count +=1 end end newDevicesAttached = dev_list if node.workorder.rfcCi.ciAttributes.has_key?("mode") mode = node.workorder.rfcCi.ciAttributes["mode"] end level = mode.gsub("raid","") msg = "" case mode when "raid0" if vols.size < 2 msg = "Minimum of 2 storage slices are required for "+mode end when "raid1" if vols.size < 2 || vols.size%2 != 0 msg = "Minimum of 2 storage slices and storage slice count mod 2 are required for "+mode end when "raid5" if vols.size < 3 msg = "Minimum of 3 storage slices are required for "+mode end when "raid10" if vols.size < 4 || vols.size%2 != 0 msg = "Minimum of 4 storage slices and storage slice count mod 2 are required for "+mode end end unless msg.empty? puts "***FAULT:FATAL=#{msg}" e = Exception.new("no backtrace") e.set_backtrace("") raise e end has_created_raid = false exec_count = 0 max_retry = 10 if vols.size > 1 && mode != 'no-raid' cmd = "yes |mdadm --create -l#{level} -n#{vols.size.to_s} --assume-clean --chunk=256 #{raid_device} #{dev_list} 2>&1" until ::File.exists?(raid_device) || has_created_raid || exec_count > max_retry do Chef::Log.info(raid_device+" being created with: "+cmd) out = `#{cmd}` exit_code = $?.to_i Chef::Log.info("exit_code: "+exit_code.to_s+" out: "+out) if exit_code == 0 has_created_raid = true # really always need to readahead 64k? # TODO: analyze impact of 64k read-ahead - extra cost to perf #`blockdev --setra 65536 /dev/md/#{node.workorder.rfcCi.ciName}` else exec_count += 1 sleep 10 ccmd = "for f in /dev/md*; do mdadm --stop $f; done" Chef::Log.info("cleanup bad arrays: "+ccmd) Chef::Log.info(`#{ccmd}`) ccmd = "mdadm --zero-superblock #{dev_list}" Chef::Log.info("cleanup incase re-using: "+ccmd) Chef::Log.info(`#{ccmd}`) end end node.set["raid_device"] = raid_device else Chef::Log.info("No Raid Device ID :" +no_raid_device) raid_device = no_raid_device node.set["raid_device"] = no_raid_device end end end end ### filesystem - check for new attr and exit for backwards compat _mount_point = nil _device = nil _fstype = nil _options = nil attrs = node.workorder.rfcCi.ciAttributes if attrs.has_key?("mount_point") Chef::Log.info("using filesystem-in-volume logic") _mount_point = attrs["mount_point"] _device = attrs["device"] _options = attrs["options"] _fstype = attrs["fstype"] end if node[:platform_family] == "rhel" && node[:platform_version].to_i >= 7 Chef::Log.info("starting the logical volume manager.") service 'lvm2-lvmetad' do action [:enable, :start] provider Chef::Provider::Service::Systemd end end ruby_block 'create-ephemeral-volume-on-azure-vm' do only_if { (storage.nil? && token_class =~ /azure/ && _fstype != 'tmpfs') } block do initial_mountpoint = '/mnt/resource' restore_script_dir = '/opt/oneops/azure-restore-ephemeral-mntpts' script_fullpath_name = "#{restore_script_dir}/#{logical_name}.sh" `mkdir #{restore_script_dir}` `touch #{script_fullpath_name}` Chef::Log.info("unmounting #{initial_mountpoint}") `echo "umount #{initial_mountpoint}" > #{script_fullpath_name}` ephemeralDevice = '/dev/sdb1' `echo "pvcreate -f #{ephemeralDevice}" >> #{script_fullpath_name}` `echo "vgcreate #{platform_name}-eph #{ephemeralDevice}" >> #{script_fullpath_name}` l_switch = "-L" if size =~ /%/ l_switch = "-l" end `echo ""yes" | lvcreate #{l_switch} #{size} -n #{logical_name} #{platform_name}-eph" >> #{script_fullpath_name}` `echo "if [ ! -d #{_mount_point}/lost+found ]" >> #{script_fullpath_name}` `echo "then" >> #{script_fullpath_name}` if node[:platform_family] == "rhel" && (node[:platform_version]).to_i >= 7 # -f switch not valid in latest mkfs `echo "mkfs -t #{_fstype} /dev/#{platform_name}-eph/#{logical_name}" >> #{script_fullpath_name}` else `echo "mkfs -t #{_fstype} -f /dev/#{platform_name}-eph/#{logical_name}" >> #{script_fullpath_name}` end `echo "fi" >> #{script_fullpath_name}` `echo "mkdir -p #{_mount_point}" >> #{script_fullpath_name}` `echo "mount /dev/#{platform_name}-eph/#{logical_name} #{_mount_point}" >> #{script_fullpath_name}` `sudo chmod +x #{script_fullpath_name}` awk_cmd = "awk /#{logical_name}.sh/ /etc/rc.d/rc.local | wc -l" `echo "count=\\$(#{awk_cmd})">> #{script_fullpath_name}` # Check whether script is already added to rc.local, add restore script if not present. `echo "if [ \\$count == 0 ];then" >> #{script_fullpath_name}` `echo "sudo echo \\"sh #{script_fullpath_name}\\" >> \/etc\/rc.d\/rc.local" >> #{script_fullpath_name}` `echo "fi" >> #{script_fullpath_name}` `sudo chmod +x /etc/rc.d/rc.local` Chef::Log.info("executing #{script_fullpath_name} script") `sudo sh "#{script_fullpath_name}"` end end ruby_block 'create-ephemeral-volume-ruby-block' do # only create ephemeral if doesn't depend_on storage not_if { token_class =~ /azure/ || _fstype == "tmpfs" || !storage.nil? } block do #get rid of /mnt if provider added it initial_mountpoint = "/mnt" has_provider_mount = false `grep /mnt /etc/fstab | grep cloudconfig` if $?.to_i == 0 has_provider_mount = true end if token_class =~ /vsphere/ initial_mountpoint = "/mnt/resource" `grep #{initial_mountpoint} /etc/fstab` if $?.to_i == 0 has_provider_mount = true end end if has_provider_mount Chef::Log.info("unmounting and clearing fstab for #{initial_mountpoint}") `umount #{initial_mountpoint}` `egrep -v "\/mnt" /etc/fstab > /tmp/fstab` `mv -f /tmp/fstab /etc/fstab` end devices = Array.new # c,d are used on aws m1.medium - j,k are set on aws rhel 6.3 L device_set = ["b","c","d","e","f","g","h","i","j","k"] # aws device_prefix = "/dev/xvd" case token_class when /openstack/ device_prefix = "/dev/vd" device_set = ["b"] Chef::Log.info("using openstack vdb") when /vsphere/ device_prefix = "/dev/sd" device_set = ["b"] Chef::Log.info("using vsphere sdb") end df_out = `df -k`.to_s device_set.each do |ephemeralIndex| ephemeralDevice = device_prefix+ephemeralIndex if ::File.exists?(ephemeralDevice) && df_out !~ /#{ephemeralDevice}/ # remove partitions - azure and rackspace add them `parted #{ephemeralDevice} rm 1` Chef::Log.info("removing partition #{ephemeralDevice}") devices.push(ephemeralDevice) end end total_size = 0 device_list = "" existing_dev = `pvdisplay -s` devices.each do |device| dev_short = device.split("/").last if existing_dev !~ /#{dev_short}/ Chef::Log.info("pvcreate #{device} ..."+`pvcreate -f #{device}`) device_list += device+" " end end if device_list != "" Chef::Log.info("vgcreate #{platform_name}-eph #{device_list} ..."+`vgcreate -f #{platform_name}-eph #{device_list}`) else Chef::Log.info("no ephemerals.") end l_switch = "-L" if size =~ /%/ l_switch = "-l" end `vgdisplay #{platform_name}-eph` if $?.to_i == 0 `lvdisplay /dev/#{platform_name}-eph/#{logical_name}` if $?.to_i != 0 execute_command("yes | lvcreate #{l_switch} #{size} -n #{logical_name} #{platform_name}-eph") else Chef::Log.warn("logical volume #{platform_name}-eph/#{logical_name} already exists and hence cannot recreate .. prefer replacing compute") end end end end ruby_block 'create-storage-non-ephemeral-volume' do only_if { storage != nil && token_class !~ /virtualbox|vagrant/ } block do if mode != "no-raid" raid_devices = node.raid_device else raid_devices = newDevicesAttached end devices = Array.new raid_devices.split(" ").each do |raid_device| if ::File.exists?(raid_device) Chef::Log.info(raid_device+" exists.") devices.push(raid_device) else Chef::Log.info("raid device " +raid_device+" missing.") volume_device = node[:volume][:device] volume_device = node[:device] if volume_device.nil? || volume_device.empty? if node[:storage_provider_class] =~ /azure/ Chef::Log.info("Checking for"+ volume_device + "....") if ::File.exists?(volume_device) Chef::Log.info("device " + volume_device + " found. Using this device for logical volumes.") devices.push(volume_device) else Chef::Log.info("No storage device named " + volume_device + " found. Exiting ...") exit 1 end else exit 1 end end end total_size = 0 device_list = "" existing_dev = `pvdisplay -s` devices.each do |device| dev_short = device.split("/").last if existing_dev !~ /#{dev_short}/ Chef::Log.info("pvcreate #{device} ..."+`pvcreate #{device}`) device_list += device+" " end end if device_list != "" if rfc_action != "update" # yes | and -ff needed sometimes Chef::Log.info("vgcreate #{platform_name} #{device_list} ..."+`yes | vgcreate -ff #{platform_name} #{device_list}`) else Chef::Log.info("vgextend #{platform_name} #{device_list} ..."+`yes | vgextend -ff #{platform_name} #{device_list}`) end else Chef::Log.info("Volume Group Exists Already") end l_switch = "-L" if size =~ /%/ l_switch = "-l" end `lvdisplay /dev/#{platform_name}/#{logical_name}` if $?.to_i != 0 execute_command("yes | lvcreate #{l_switch} #{size} -n #{logical_name} #{platform_name}") else Chef::Log.warn("logical volume #{platform_name}/#{logical_name} already exists and hence cannot recreate .. prefer replacing compute") end if rfc_action == "update" && storageUpdated execute_command("yes |lvextend #{l_switch} +#{size} /dev/#{platform_name}/#{logical_name}") end execute_command("vgchange -ay #{platform_name}") end end if token_class =~ /ibm/ _fstype = "ext3" end package "xfsprogs" do only_if { _fstype == "xfs" } end ruby_block 'filesystem' do not_if { _mount_point == nil || _fstype == "tmpfs" } block do if ((token_class =~ /azure/) && (storage.nil? || storage.empty?)) Chef::Log.info("Not creating the fstab entry for epheremal on azure compute") Chef::Log.info("auto mounting is being handle in rc.local, needs to be revisited.") else block_dev = node.workorder.rfcCi _device = "/dev/#{platform_name}/#{block_dev['ciName']}" # if ebs/storage exists then use it, else use the -eph ephemeral volume if ! ::File.exists?(_device) _device = "/dev/#{platform_name}-eph/#{block_dev['ciName']}" if ! ::File.exists?(_device) # micro,tiny and rackspace don't have ephemeral Chef::Log.info("_device #{_device} don't exists") next end end if _options == nil || _options.empty? _options = "defaults" end case _fstype when 'nfs', 'nfs4' include_recipe "volume::nfs" end Chef::Log.info("filesystem type: "+_fstype+" device: "+_device +" mount_point: "+_mount_point) # result attr updates cms Chef::Log.info("***RESULT:device="+_device) if rfc_action == "update" has_resized = false if _fstype == "xfs" `xfs_growfs #{_mount_point}` Chef::Log.info("Extending the xfs filesystem" ) has_resized = true elsif (_fstype == "ext4" || _fstype == "ext3") && File.exists?("/dev/#{platform_name}/#{logical_name}") `resize2fs /dev/#{platform_name}/#{logical_name}` Chef::Log.info("Extending the filesystem" ) has_resized = true end if has_resized && $? != 0 exit_with_error "Error in extending filesystem" end end `mountpoint -q #{_mount_point}` if $?.to_i == 0 Chef::Log.info("device #{_mount_point} already mounted.") next end type = (`file -sL #{_device}`).chop.split(" ")[1] Chef::Log.info("-------------------------") Chef::Log.info("Type : = "+type ) Chef::Log.info("-------------------------") if type == "data" if node[:platform_family] == "rhel" && (node[:platform_version]).to_i >= 7 cmd = "mkfs -t #{_fstype} #{_device}" # -f switch not valid in latest mkfs else cmd = "mkfs -t #{_fstype} -f #{_device}" end Chef::Log.info(cmd+" ... "+`#{cmd}`) end # in-line because of the ruby_block doesn't allow updated _device value passed to mount resource `mkdir -p #{_mount_point}` `mount -t #{_fstype} -o #{_options} #{_device} #{_mount_point}` # clear and add to fstab again to make sure has current attrs on update `grep -v #{_device} /etc/fstab > /tmp/fstab` ::File.open("/tmp/fstab","a") do |fstab| fstab.puts("#{_device} #{_mount_point} #{_fstype} #{_options} 1 1") Chef::Log.info("adding to fstab #{_device} #{_mount_point} #{_fstype} #{_options} 1 1") end `mv /tmp/fstab /etc/fstab` if token_class =~ /azure/ `sudo mkdir /opt/oneops/workorder` `sudo chmod 777 /opt/oneops/workorder` end end end end ruby_block 'ramdisk tmpfs' do only_if { _fstype == "tmpfs" } block do # Unmount existing mount for the same mount_point `mount | grep #{_mount_point}` if $?.to_i == 0 Chef::Log.info("device #{_device} for mount-point #{_mount_point} already mounted.Will unmount it.") result=`umount #{_mount_point}` Chef::Log.error("umount error: #{result.to_s}") if result.to_i != 0 end if _options == nil || _options.empty? _options = "defaults" end Chef::Log.info("mounting ramdisk :: filetype:#{_fstype} dir:#{_mount_point} device:#{_device} size:#{size} options:#{_options}") # Make directory if not existing `mkdir -p #{_mount_point}` result=`mount -t #{_fstype} -o size=#{size} #{_fstype} #{_mount_point}"` Chef::Log.error("mount error: #{result.to_s}") if result.to_i != 0 # clear existing mount_point and add to fstab again to ensure update attributes and to persist the ramdisk across reboots `grep -v #{_mount_point} /etc/fstab > /tmp/fstab` ::File.open("/tmp/fstab","a") do |fstab| fstab.puts("#{_device} #{_mount_point} #{_fstype} #{_options},size=#{size}") Chef::Log.info("adding to fstab #{_device} #{_mount_point} #{_fstype} #{_options}") end `mv /tmp/fstab /etc/fstab` end end
Sense-Studios/VirtualMixerProject
public/compositions/clicktrack.js
<filename>public/compositions/clicktrack.js /* * Example 1 * * mixes 2 sold sources together * */ // create a renderer var renderer = new GlRenderer(); // create some solids var red = new SolidSource( renderer, { color: { r: 1.0, g: 0.0, b: 0.0 } } ); var green = new SolidSource( renderer, { color: { r: 0.0, g: 1.0, b: 0.0 } } ); var blue = new SolidSource( renderer, { color: { r: 0.0, g: 0.0, b: 1.0 } } ); var source1 = new VideoSource( renderer, { }) var source2 = new VideoSource( renderer, { }) var filemanager1 var filemanager2 // create a mixer, mix red and green var mixer1 = new Mixer( renderer, { source1: source1, source2: source2 }); // finally asign that mixer to the output var output = new Output( renderer, mixer1 ) //var analysis = new AudioAnalysis( renderer, { audio: '/audio/rage_hard.mp3' } ); //analysis.mod = 0.5 //analysis.bpm = 24 // initialize the renderer and start the renderer renderer.init(); // init renderer.render(); // start update & animation //var bpm = analysis; var spreadsheet_orig_url = "https://docs.google.com/spreadsheets/d/1UoFjm5NZJXBfVgeFzYzWyfzRLjg4TjB4bAsTumQjsr4/edit#gid=0"; var key = "<KEY>"; var spreadsheet_id = spreadsheet_orig_url.match(/[A-Za-z0-9_]{44}/gi)[0]; var spreadsheet_url = "https://sheets.googleapis.com/v4/spreadsheets/"+spreadsheet_id+"/?key=" + key; var sheet = "Blad1" var spreadsheet_data_url = "https://sheets.googleapis.com/v4/spreadsheets/"+spreadsheet_id+"/values/"+sheet+"?key=" + key; console.log("open: ", spreadsheet_url) console.log("sheet: ", spreadsheet_data_url) //$.get('/clients/movietrader/tools/tool_data.json', function(d) { var u = new Utils() var items = [] u.get(spreadsheet_data_url, function(v) { var items = []; d = JSON.parse(v).values for ( var i = 2 ; i < d.length; i++ ) { items.push(d[i]); } startTheShow(items) }) // add a function that moves the mixer handle from left to right. var c = 0; var time = 0 var startTime = (new Date()).getTime(); var helper = { setTime: function( _time ) { c = _time/100 time = time } } function startTheShow(_items) { console.log("start the show", _items) setInterval( function() { var now = (new Date()).getTime(); c += 0.01 // time = Math.round(c*10000)/10000 time = (now-startTime)/1000 //console.log(" >> ", time) // var startTime = (new Date()).getTime(); //mixer1.pod ( ( Math.sin(c) * 0.5 ) + 0.5 ); document.getElementById("currenttime").innerHTML = time _items.forEach(function( val, i ) { if ( time > parseFloat(val) ) { var execute = _items.splice(0,1)[0] console.log("execute?: ", i, execute, execute.length) if (execute.length >= 3) { //try{ console.log("EXECUTE: ", i, execute) var module = window[execute[1]] if ( isNaN(execute[3]) ) { module[ execute[2] ]( execute[3] ) }else{ module[ execute[2] ]( parseFloat(execute[3]) ) } } } }) },10) }
best08618/asylo
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/aarch64/cmp.c
/* { dg-do compile } */ /* { dg-options "-O2" } */ int cmp_si_test1 (int a, int b, int c) { if (a > b) return a + c; else return a + b + c; } int cmp_si_test2 (int a, int b, int c) { if ((a >> 3) > b) return a + c; else return a + b + c; } typedef long long s64; s64 cmp_di_test1 (s64 a, s64 b, s64 c) { if (a > b) return a + c; else return a + b + c; } s64 cmp_di_test2 (s64 a, s64 b, s64 c) { if ((a >> 3) > b) return a + c; else return a + b + c; } int cmp_di_test3 (int a, s64 b, s64 c) { if (a > b) return a + c; else return a + b + c; } int cmp_di_test4 (int a, s64 b, s64 c) { if (((s64)a << 3) > b) return a + c; else return a + b + c; } /* { dg-final { scan-assembler-times "cmp\tw\[0-9\]+, w\[0-9\]+" 2 } } */ /* { dg-final { scan-assembler-times "cmp\tx\[0-9\]+, x\[0-9\]+" 4 } } */