Home
last modified time | relevance | path

Searched refs:bsearch (Results 1 – 25 of 4148) sorted by relevance

12345678910>>...166

/dports/lang/ruby26/ruby-2.6.9/spec/ruby/core/range/
H A Dbsearch_spec.rb6 (0..1).bsearch.should be_an_instance_of(Enumerator)
33 (0...3).bsearch { |x| x > 3 }.should be_nil
37 (0..3).bsearch { |x| nil }.should be_nil
41 (-2..4).bsearch { |x| x < 4 }.should == -2
45 (0..4).bsearch { |x| x >= 2 }.should == 2
46 (-1..4).bsearch { |x| x >= 1 }.should == 1
50 (0..4).bsearch { |x| x >= 4 }.should == 4
51 (0...4).bsearch { |x| x >= 3 }.should == 3
57 (0..3).bsearch { |x| x <=> 5 }.should be_nil
61 (0..3).bsearch { |x| x <=> -1 }.should be_nil
[all …]
/dports/lang/ruby26/ruby-2.6.9/spec/ruby/core/array/
H A Dbsearch_spec.rb6 [1].bsearch.should be_an_instance_of(Enumerator)
16 lambda { [1].bsearch { "1" } }.should raise_error(TypeError)
21 [0, 1, 2, 3].bsearch { |x| x > 3 }.should be_nil
25 [0, 1, 2, 3].bsearch { |x| nil }.should be_nil
29 [0, 1, 2, 3].bsearch { |x| x < 4 }.should == 0
34 [0, 1, 3, 4].bsearch { |x| x >= 2 }.should == 3
35 [0, 1, 3, 4].bsearch { |x| x >= 1 }.should == 1
41 [0, 1, 2, 3].bsearch { |x| x <=> 5 }.should be_nil
45 [0, 1, 2, 3].bsearch { |x| x <=> -1 }.should be_nil
50 [0, 1, 3, 4].bsearch { |x| x <=> 2 }.should be_nil
[all …]
/dports/lang/tclX/tclx8.4/tests/
H A Dbsearch.test2 # bsearch.test
4 # Tests for the bsearch command.
15 # $Id: bsearch.test,v 1.2 2002/04/02 02:29:43 hobbs Exp $
38 # Test bsearch
53 test bsearch-1.1.$cnt {bsearch tests} {
54 bsearch $testFH $key1
56 test bsearch-1.2.$cnt {bsearch tests} {
57 bsearch $testFH $key2 {} BsearchTestCmp
61 test bsearch-1.3.$cnt {bsearch tests} {
62 list [bsearch $testFH $key1 rec] $rec
[all …]
/dports/net/drawterm/drawterm/libc/
H A Drunetype.c1018 #define bsearch xbsearch macro
1021 bsearch(Rune c, Rune *t, int n, int ne) in bsearch() function
1045 p = bsearch(c, _tolower2, nelem(_tolower2)/3, 3); in tolowerrune()
1048 p = bsearch(c, _tolower1, nelem(_tolower1)/2, 2); in tolowerrune()
1059 p = bsearch(c, _toupper2, nelem(_toupper2)/3, 3); in toupperrune()
1062 p = bsearch(c, _toupper1, nelem(_toupper1)/2, 2); in toupperrune()
1073 p = bsearch(c, _totitle1, nelem(_totitle1)/2, 2); in totitlerune()
1084 p = bsearch(c, _toupper2, nelem(_toupper2)/3, 3); in islowerrune()
1114 p = bsearch(c, _alpha2, nelem(_alpha2)/2, 2); in isalpharune()
1117 p = bsearch(c, _alpha1, nelem(_alpha1), 1); in isalpharune()
[all …]
/dports/graphics/aseprite/aseprite-1.2.9/third_party/mujs/
H A Dutftype.c3 #define bsearch jsU_bsearch macro
1021 bsearch(Rune c, Rune *t, int n, int ne) in bsearch() function
1045 p = bsearch(c, __tolower2, nelem(__tolower2)/3, 3); in tolowerrune()
1048 p = bsearch(c, __tolower1, nelem(__tolower1)/2, 2); in tolowerrune()
1059 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in toupperrune()
1062 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in toupperrune()
1073 p = bsearch(c, __totitle1, nelem(__totitle1)/2, 2); in totitlerune()
1084 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in islowerrune()
1114 p = bsearch(c, __alpha2, nelem(__alpha2)/2, 2); in isalpharune()
1117 p = bsearch(c, __alpha1, nelem(__alpha1), 1); in isalpharune()
[all …]
/dports/graphics/mupdf/mupdf-1.18.0-source/thirdparty/mujs/
H A Dutftype.c3 #define bsearch jsU_bsearch macro
1013 bsearch(Rune c, const Rune *t, int n, int ne) in bsearch() function
1037 p = bsearch(c, __tolower2, nelem(__tolower2)/3, 3); in tolowerrune()
1040 p = bsearch(c, __tolower1, nelem(__tolower1)/2, 2); in tolowerrune()
1051 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in toupperrune()
1054 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in toupperrune()
1065 p = bsearch(c, __totitle1, nelem(__totitle1)/2, 2); in totitlerune()
1076 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in islowerrune()
1106 p = bsearch(c, __alpha2, nelem(__alpha2)/2, 2); in isalpharune()
1109 p = bsearch(c, __alpha1, nelem(__alpha1), 1); in isalpharune()
[all …]
/dports/lang/ruby26/ruby-2.6.9/test/ruby/
H A Dtest_range.rb670 (1..42).bsearch{ "not ok" }
674 (1..42).bsearch {c.new}
676 assert_equal (1..42).bsearch{}, (1..42).bsearch{false}
680 enum = (42...666).bsearch
687 (Rational(-1,2)..Rational(9,4)).bsearch
728 v = (-inf..0).bsearch {|x| x != -inf }
742 v = (0..inf).bsearch {|x| x >= Float::MAX }
750 v = (-inf..0).bsearch {|x| x >= -Float::MAX }
754 v = (-inf..0).bsearch {|x| x > -Float::MAX }
775 r = (to...to).bsearch do
[all …]
/dports/x11-wm/wmii/wmii-3.6/libutf/
H A Drunetype.c1034 bsearch(Rune c, Rune *t, int n, int ne) in bsearch() function
1058 p = bsearch(c, __tolower2, nelem(__tolower2)/3, 3); in tolowerrune()
1061 p = bsearch(c, __tolower1, nelem(__tolower1)/2, 2); in tolowerrune()
1072 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in toupperrune()
1075 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in toupperrune()
1086 p = bsearch(c, __totitle1, nelem(__totitle1)/2, 2); in totitlerune()
1097 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in islowerrune()
1100 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in islowerrune()
1127 p = bsearch(c, __alpha2, nelem(__alpha2)/2, 2); in isalpharune()
1130 p = bsearch(c, __alpha1, nelem(__alpha1), 1); in isalpharune()
[all …]
/dports/x11-wm/wmii-devel/wmii+ixp-3.9.2/libutf/
H A Drunetype.c1034 bsearch(Rune c, Rune *t, int n, int ne) in bsearch() function
1058 p = bsearch(c, __tolower2, nelem(__tolower2)/3, 3); in tolowerrune()
1061 p = bsearch(c, __tolower1, nelem(__tolower1)/2, 2); in tolowerrune()
1072 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in toupperrune()
1075 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in toupperrune()
1086 p = bsearch(c, __totitle1, nelem(__totitle1)/2, 2); in totitlerune()
1097 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in islowerrune()
1100 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in islowerrune()
1127 p = bsearch(c, __alpha2, nelem(__alpha2)/2, 2); in isalpharune()
1130 p = bsearch(c, __alpha1, nelem(__alpha1), 1); in isalpharune()
[all …]
/dports/devel/9base/9base-6/lib9/utf/
H A Drunetype.c1034 bsearch(Rune c, Rune *t, int n, int ne) in bsearch() function
1058 p = bsearch(c, __tolower2, nelem(__tolower2)/3, 3); in tolowerrune()
1061 p = bsearch(c, __tolower1, nelem(__tolower1)/2, 2); in tolowerrune()
1072 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in toupperrune()
1075 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in toupperrune()
1086 p = bsearch(c, __totitle1, nelem(__totitle1)/2, 2); in totitlerune()
1097 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in islowerrune()
1100 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in islowerrune()
1127 p = bsearch(c, __alpha2, nelem(__alpha2)/2, 2); in isalpharune()
1130 p = bsearch(c, __alpha1, nelem(__alpha1), 1); in isalpharune()
[all …]
/dports/devel/plan9port/plan9port-1f098efb7370a0b28306d10681e21883fb1c1507/src/lib9/utf/
H A Drunetype.c1034 bsearch(Rune c, Rune *t, int n, int ne) in bsearch() function
1058 p = bsearch(c, __tolower2, nelem(__tolower2)/3, 3); in tolowerrune()
1061 p = bsearch(c, __tolower1, nelem(__tolower1)/2, 2); in tolowerrune()
1072 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in toupperrune()
1075 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in toupperrune()
1086 p = bsearch(c, __totitle1, nelem(__totitle1)/2, 2); in totitlerune()
1097 p = bsearch(c, __toupper2, nelem(__toupper2)/3, 3); in islowerrune()
1100 p = bsearch(c, __toupper1, nelem(__toupper1)/2, 2); in islowerrune()
1127 p = bsearch(c, __alpha2, nelem(__alpha2)/2, 2); in isalpharune()
1130 p = bsearch(c, __alpha1, nelem(__alpha1), 1); in isalpharune()
[all …]
/dports/converters/p5-Convert-Binary-C/Convert-Binary-C-0.84/tests/include/pdclib/functions/stdlib/
H A Dbsearch.c11 void * bsearch( const void * key, const void * base, size_t nmemb, size_t size, int ( *compar )( co… in bsearch() function
53 TESTCASE( bsearch( "e", abcde, 4, 1, compare ) == NULL ); in main()
54 TESTCASE( bsearch( "e", abcde, 5, 1, compare ) == &abcde[4] ); in main()
55 TESTCASE( bsearch( "a", abcde + 1, 4, 1, compare ) == NULL ); in main()
56 TESTCASE( bsearch( "0", abcde, 1, 1, compare ) == NULL ); in main()
57 TESTCASE( bsearch( "a", abcde, 1, 1, compare ) == &abcde[0] ); in main()
58 TESTCASE( bsearch( "a", abcde, 0, 1, compare ) == NULL ); in main()
59 TESTCASE( bsearch( "e", abcde, 3, 2, compare ) == &abcde[4] ); in main()
60 TESTCASE( bsearch( "b", abcde, 3, 2, compare ) == NULL ); in main()
/dports/devel/llvm-devel/llvm-project-f05c95f10fc1d8171071735af8ad3a9e87633120/libc/test/src/stdlib/
H A Dbsearch_test.cpp28 EXPECT_TRUE(__llvm_libc::bsearch(nullptr, &val, 1, sizeof(int), in TEST()
30 EXPECT_TRUE(__llvm_libc::bsearch(&val, nullptr, 1, sizeof(int), in TEST()
32 EXPECT_TRUE(__llvm_libc::bsearch(&val, &val, 0, sizeof(int), int_compare) == in TEST()
34 EXPECT_TRUE(__llvm_libc::bsearch(&val, &val, 1, 0, int_compare) == nullptr); in TEST()
48 __llvm_libc::bsearch(&key, array, s, sizeof(int), int_compare); in TEST()
56 ASSERT_TRUE(__llvm_libc::bsearch(&key, &array, s, sizeof(int), in TEST()
60 ASSERT_TRUE(__llvm_libc::bsearch(&key, &array, s, sizeof(int), in TEST()
64 ASSERT_TRUE(__llvm_libc::bsearch(&key, &array, s, sizeof(int), in TEST()
67 ASSERT_TRUE(__llvm_libc::bsearch(&key, &array, s, sizeof(int), in TEST()
76 __llvm_libc::bsearch(array, array, array_size, sizeof(int), int_compare); in TEST()
/dports/lang/p5-List-MoreUtils/List-MoreUtils-0.430/t/inline/
H A Dbsearch.pm8 ok(scalar bsearch { $_ - $elem } @list);
12 my ($e) = bsearch { $_ - $elem } @list;
18 my $r = bsearch { $_ - $elem } @list;
23 bsearch => sub {
25 scalar bsearch { $_ - $elem } @list;
32 scalar bsearch { grow_stack(); $_ - $elem } @list;
40 scalar bsearch { grow_stack(); $_ - $elem or die "Goal!"; $_ - $elem } @list;
44 is_dying('bsearch without sub' => sub { &bsearch(42, (1 .. 100)); });
/dports/lang/p5-List-MoreUtils-XS/List-MoreUtils-XS-0.430/t/inline/
H A Dbsearch.pm8 ok(scalar bsearch { $_ - $elem } @list);
12 my ($e) = bsearch { $_ - $elem } @list;
18 my $r = bsearch { $_ - $elem } @list;
23 bsearch => sub {
25 scalar bsearch { $_ - $elem } @list;
32 scalar bsearch { grow_stack(); $_ - $elem } @list;
40 scalar bsearch { grow_stack(); $_ - $elem or die "Goal!"; $_ - $elem } @list;
44 is_dying('bsearch without sub' => sub { &bsearch(42, (1 .. 100)); });
/dports/lang/p5-List-MoreUtils-XS/List-MoreUtils-XS-0.430/t/xs/
H A Dbsearch.t15 ok(scalar bsearch { $_ - $elem } @list);
19 my ($e) = bsearch { $_ - $elem } @list;
25 my $r = bsearch { $_ - $elem } @list;
30 bsearch => sub {
32 scalar bsearch { $_ - $elem } @list;
39 scalar bsearch { grow_stack(); $_ - $elem } @list;
47 scalar bsearch { grow_stack(); $_ - $elem or die "Goal!"; $_ - $elem } @list;
51 is_dying('bsearch without sub' => sub { &bsearch(42, (1 .. 100)); });
/dports/lang/p5-List-MoreUtils/List-MoreUtils-0.430/t/xs/
H A Dbsearch.t17 ok(scalar bsearch { $_ - $elem } @list);
21 my ($e) = bsearch { $_ - $elem } @list;
27 my $r = bsearch { $_ - $elem } @list;
32 bsearch => sub {
34 scalar bsearch { $_ - $elem } @list;
41 scalar bsearch { grow_stack(); $_ - $elem } @list;
49 scalar bsearch { grow_stack(); $_ - $elem or die "Goal!"; $_ - $elem } @list;
53 is_dying('bsearch without sub' => sub { &bsearch(42, (1 .. 100)); });
/dports/lang/p5-List-MoreUtils/List-MoreUtils-0.430/t/pureperl/
H A Dbsearch.t17 ok(scalar bsearch { $_ - $elem } @list);
21 my ($e) = bsearch { $_ - $elem } @list;
27 my $r = bsearch { $_ - $elem } @list;
32 bsearch => sub {
34 scalar bsearch { $_ - $elem } @list;
41 scalar bsearch { grow_stack(); $_ - $elem } @list;
49 scalar bsearch { grow_stack(); $_ - $elem or die "Goal!"; $_ - $elem } @list;
53 is_dying('bsearch without sub' => sub { &bsearch(42, (1 .. 100)); });
/dports/mail/alpine/alpine-465e23b/pico/
H A Dsearch.c474 if(bsearch){ in replace_pat()
576 if(bsearch) in replace_pat()
591 supdate(defpat, bsearch); in replace_pat()
646 supdate(defpat, bsearch); in replace_pat()
692 if(bsearch){ in replace_all()
749 if(bsearch){ in replace_all()
849 if(bsearch){ in srpat()
1047 if(bsearch){ in readpattern()
1136 if(bsearch != 0){ in reverse_all()
1210 int bsearch; in forscan() local
[all …]
/dports/editors/pico-alpine/alpine-465e23b/pico/
H A Dsearch.c474 if(bsearch){ in replace_pat()
576 if(bsearch) in replace_pat()
591 supdate(defpat, bsearch); in replace_pat()
646 supdate(defpat, bsearch); in replace_pat()
692 if(bsearch){ in replace_all()
749 if(bsearch){ in replace_all()
849 if(bsearch){ in srpat()
1047 if(bsearch){ in readpattern()
1136 if(bsearch != 0){ in reverse_all()
1210 int bsearch; in forscan() local
[all …]
/dports/devel/cargo-c/cargo-c-0.9.6+cargo-0.58/cargo-crates/libnghttp2-sys-0.1.7+1.45.0/nghttp2/third-party/mruby/mrbgems/mruby-array-ext/test/
H A Darray.rb260 assert_equal 0, a.bsearch{ |x| x >= -1 }
261 assert_equal 0, a.bsearch{ |x| x >= 0 }
262 assert_equal 2, a.bsearch{ |x| x >= 1 }
263 assert_equal 2, a.bsearch{ |x| x >= 2 }
264 assert_equal 4, a.bsearch{ |x| x >= 3 }
265 assert_equal 4, a.bsearch{ |x| x >= 4 }
266 assert_nil a.bsearch{ |x| x >= 5 }
279 assert_nil a.bsearch{ |x| between(-3, x, -1) }
280 assert_equal 0, a.bsearch{ |x| between(-1, x, 1) }
281 assert_nil a.bsearch{ |x| between( 1, x, 3) }
[all …]
/dports/net/proby/proby-1.0.2/cargo-crates/libnghttp2-sys-0.1.4+1.41.0/nghttp2/third-party/mruby/mrbgems/mruby-array-ext/test/
H A Darray.rb233 assert_equal 0, a.bsearch{ |x| x >= -1 }
234 assert_equal 0, a.bsearch{ |x| x >= 0 }
235 assert_equal 2, a.bsearch{ |x| x >= 1 }
236 assert_equal 2, a.bsearch{ |x| x >= 2 }
237 assert_equal 4, a.bsearch{ |x| x >= 3 }
238 assert_equal 4, a.bsearch{ |x| x >= 4 }
239 assert_nil a.bsearch{ |x| x >= 5 }
252 assert_nil a.bsearch{ |x| between(-3, x, -1) }
253 assert_equal 0, a.bsearch{ |x| between(-1, x, 1) }
254 assert_nil a.bsearch{ |x| between( 1, x, 3) }
[all …]
/dports/devel/cargo-generate/cargo-generate-0.9.0/cargo-crates/libnghttp2-sys-0.1.6+1.43.0/nghttp2/third-party/mruby/mrbgems/mruby-array-ext/test/
H A Darray.rb260 assert_equal 0, a.bsearch{ |x| x >= -1 }
261 assert_equal 0, a.bsearch{ |x| x >= 0 }
262 assert_equal 2, a.bsearch{ |x| x >= 1 }
263 assert_equal 2, a.bsearch{ |x| x >= 2 }
264 assert_equal 4, a.bsearch{ |x| x >= 3 }
265 assert_equal 4, a.bsearch{ |x| x >= 4 }
266 assert_nil a.bsearch{ |x| x >= 5 }
279 assert_nil a.bsearch{ |x| between(-3, x, -1) }
280 assert_equal 0, a.bsearch{ |x| between(-1, x, 1) }
281 assert_nil a.bsearch{ |x| between( 1, x, 3) }
[all …]
/dports/www/libnghttp2/nghttp2-1.46.0/third-party/mruby/mrbgems/mruby-array-ext/test/
H A Darray.rb260 assert_equal 0, a.bsearch{ |x| x >= -1 }
261 assert_equal 0, a.bsearch{ |x| x >= 0 }
262 assert_equal 2, a.bsearch{ |x| x >= 1 }
263 assert_equal 2, a.bsearch{ |x| x >= 2 }
264 assert_equal 4, a.bsearch{ |x| x >= 3 }
265 assert_equal 4, a.bsearch{ |x| x >= 4 }
266 assert_nil a.bsearch{ |x| x >= 5 }
279 assert_nil a.bsearch{ |x| between(-3, x, -1) }
280 assert_equal 0, a.bsearch{ |x| between(-1, x, 1) }
281 assert_nil a.bsearch{ |x| between( 1, x, 3) }
[all …]
/dports/lang/rust/rustc-1.58.1-src/vendor/libnghttp2-sys/nghttp2/third-party/mruby/mrbgems/mruby-array-ext/test/
H A Darray.rb233 assert_equal 0, a.bsearch{ |x| x >= -1 }
234 assert_equal 0, a.bsearch{ |x| x >= 0 }
235 assert_equal 2, a.bsearch{ |x| x >= 1 }
236 assert_equal 2, a.bsearch{ |x| x >= 2 }
237 assert_equal 4, a.bsearch{ |x| x >= 3 }
238 assert_equal 4, a.bsearch{ |x| x >= 4 }
239 assert_nil a.bsearch{ |x| x >= 5 }
252 assert_nil a.bsearch{ |x| between(-3, x, -1) }
253 assert_equal 0, a.bsearch{ |x| between(-1, x, 1) }
254 assert_nil a.bsearch{ |x| between( 1, x, 3) }
[all …]

12345678910>>...166