search for: return_values

Displaying 20 results from an estimated 74 matches for "return_values".

Did you mean: return_value
2006 Sep 22
2
foo.expects(:blah).returns(10).then(11) syntax
...: test/mocha/expectation_test.rb =================================================================== --- test/mocha/expectation_test.rb (revision 854) +++ test/mocha/expectation_test.rb (working copy) @@ -95,6 +95,12 @@ assert_equal 99, expectation.invoke end + def test_should_return_values_in_order + expectation = Expectation.new(:expected_method).returns(9).then(10) + assert_equal 9, expectation.invoke + assert_equal 10, expectation.invoke + end + def test_should_return_nil_if_no_value_specified expectation = Expectation.new(:expected_method) assert_nil exp...
2015 Jun 29
2
CPAN issues
Hello List, Running CentOS Linux release 7.0.1406 (Core), and trying to update CPAN from version 1.98 to version 2.10, but it fails. <snip> t/97-process_setup_options.t .. ok t/97-return_values.t .......... 6/10 # Failed test 'blib/script/cpan -j t/97-lib_cpan1/CPAN/Config.pm Local::Prereq::Fails' # at t/97-return_values.t line 49. # got: '2' # expected: '1' # Failed test 'blib/script/cpan -j t/97-lib_cpan1/CPAN/Config.pm Local::Make::Fails&...
2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
Adapt to the API changes in the newer versions of the Zend framework, in particular regarding: - strings handling - resources handling (used for the guestfs_h pointer) - iterating in hash maps - data types for function arguments Introduce helper macros to reduce greatly the amount of #if's all around the generated C code. --- generator/php.ml | 96
2011 Sep 29
1
Nothing but rhythm was left after encoding and decoding by speex on ipad(XCode 4.1 48110)
hi, I tried to encode the voice data read from AudioQueue and then decode it. There was nothing but rhythm left, it sounds like robot's voice, but I cannot recognize any word. The app was compiled by XCode 4.1. Speex 1.0.5 and 1.2.rc1 gave the same result. When compiling speex 1.0.5, I added them to Xcode project, set the Header Search Paths, then compiled successfully. When compiling speex
2007 Oct 08
2
asterisk hangs on STRPTIME
...exten => s,n,Set(v_ts=${STRFTIME(|America/New_York|%Y-%m-%d)}) exten => s,n,NoOp(${v_ts}) ; exten => s,n,Set(v_ts=) exten => s,n,Set(v_ts=${STRPTIME(2007-10-06 05:04:03|America/New_York|%Y-%m-%d %H:%M:%S)}) exten => s,n,NoOp(${v_ts}) ; I get the output : -- Executing [s at return_values:6] Set("IAX2/4883-1", "v_ts=") in new stack -- Executing [s at return_values:7] Set("IAX2/4883-1", "v_ts=2007-10-07") in new stack -- Executing [s at return_values:8] NoOp("IAX2/4883-1", "2007-10-07") in new stack -- Executing [s at ret...
2008 Nov 10
4
PathFindExtension and wide strings
Hi, What''s happening here? require ''windows/path'' require ''windows/unicode'' include Windows::Path include Windows::Unicode file_a = ''bar.txt'' file_w = multi_to_wide(file_a) p PathFindExtensionA(file_a) # ''.txt'' => OK p PathFindExtensionW(file_w) # ''.'' => WRONG Is Ruby chopping the
2015 Jun 29
0
CPAN issues
...t 5:08 PM, James D. Parra <jamesp at musicreports.com> wrote: > Hello List, > > Running CentOS Linux release 7.0.1406 (Core), and trying to update CPAN > from version 1.98 to version 2.10, but it fails. > > > <snip> > t/97-process_setup_options.t .. ok > t/97-return_values.t .......... 6/10 > # Failed test 'blib/script/cpan -j t/97-lib_cpan1/CPAN/Config.pm > Local::Prereq::Fails' > # at t/97-return_values.t line 49. > # got: '2' > # expected: '1' > > # Failed test 'blib/script/cpan -j t/97-lib_cpan1/...
2007 Oct 25
2
Using strtok via win32/api
Hi all, I''m having a little trouble with strtok: require ''win32/api'' include Win32 strtok = API.new(''strtok'', ''PP, ''P'', ''msvcrt'') string = "A string\tof ,,tokens\nand some more tokens"; seps = " ,\t\n"; puts "Tokens:" token = strtok.call(string, seps) while token puts
2007 Oct 23
0
6 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_flash_security.c
libswfdec/swfdec_as_frame.c | 17 ++++--------- libswfdec/swfdec_as_internal.h | 7 +++++ libswfdec/swfdec_as_interpret.c | 2 + libswfdec/swfdec_as_interpret.h | 2 + libswfdec/swfdec_as_object.c | 42 ++++++++++++++++++++++++---------- libswfdec/swfdec_as_script_function.c | 2 + libswfdec/swfdec_flash_security.c | 12 ++++-----
2007 Jan 02
4
allow stubbing of previously defined methods such as "id"
On my current project I needed to create a stub that responded correctly to the id message. Here''s the change I put into my copy of head. Index: lib/mocha/mock_methods.rb =================================================================== --- lib/mocha/mock_methods.rb (revision 1114) +++ lib/mocha/mock_methods.rb (working copy) @@ -68,6 +68,7 @@ method_names =
2006 Sep 29
1
yielding consecutive values
I''m not sure if someone has already addressed this issue, but if not, here goes. I need the following behavior: def test_generate(documentation = ''/test_documentation/'', destination = ''/destination/'') yield_results = [''/'', ''filename.yaml'', ''blah.xml'']
2007 Aug 08
1
Mocking Time, delegating to original object
..._or_hash.each do |method_name, return_value| add_expectation(Stub.new(self, method_name, backtrace).returns(return_value)) end else add_expectation(Stub.new(self, method_name_or_hash, backtrace)) end end end class Expectation def delegates @return_values += ReturnValues.new(Delegator.new(self)) end alias :stops_mocking :delegates alias :stops_stubbing :delegates end class Delegator def initialize expectation @expectation = expectation end def evaluate @expectation.mock.stub_method.stubbee.send(@expectatio...
2014 Sep 09
2
[LLVMdev] [Compiler-RT] [ARM] Where __aeabi_[il]div0 builtins should be implemented?
On Mon, Sep 8, 2014 at 1:19 AM, Renato Golin <renato.golin at linaro.org> wrote: > > Why not adjust this instead? > > I was just being conservative. I don't know what else depends on this > library and I don't want to change things outside of my scope. > The current implementations actually return 0. Can you point out where that doesn't hold please? If you
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
libswfdec/swfdec_as_frame.c | 3 - libswfdec/swfdec_as_function.c | 66 ++++++++++++++++-------- libswfdec/swfdec_as_internal.h | 16 ++++- libswfdec/swfdec_as_interpret.c | 60 +++++++++++----------- libswfdec/swfdec_as_object.c | 10 ++- libswfdec/swfdec_as_super.c | 109 +++++++++++++++++++++------------------- libswfdec/swfdec_as_super.h | 10 ++- 7 files
2006 Sep 29
2
multiyield
I lied, I don''t actually need different responses each time I call the method. So the last email of mine is probably worthless. Instead, I need yield to yield 3 values when I call it once: (behavior that mimics Find.find) def test_generate(documentation = ''/test_documentation/'', destination = ''/destination/'')
2010 Jan 05
3
R matching lat/lon pairs from two datasets?
Hello, I am trying to match lat/lon from one dataset with the lat/lon from a second dataset and use that rows data for calculations. I am using match, but this is finding the first match and not comparing the pair, how can I determine if the lat/lon are the same? See example below. Is there a better way to determine to a matching pair of lat/lon values? Example Datasets: > data2
2003 Oct 17
1
Script Control of sftp
I am trying to conduct a full sftp session using the proc_open() function of PHP: http://www.php.net/manual/en/function.proc-open.php Once I get past the authentication stage, everything works fine: the script is able to write to sftp's stdin and capture its stdout. However, during the auth stage, these are apparently bypassed somehow, and IO takes place directly with the terminal. That is,
2017 Jan 13
11
[Bug 99396] New: Crash in nouveau_dri.so when switching apps with alt-tab in Gnome
https://bugs.freedesktop.org/show_bug.cgi?id=99396 Bug ID: 99396 Summary: Crash in nouveau_dri.so when switching apps with alt-tab in Gnome Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/nouveau
2007 Mar 04
4
Rails functional testing and Mocha
I''ve always wanted to be able to do stuff like this in my functional tests c = customers(:customer_1) c.expects(:great_customer_service) post :service_customer, :id => c.id This of course fails because inside the rails action a different instance of customer is used. Some of the time setting your expectation/stubbing on Customer.any_instance works, but it''s not
2002 Jul 20
3
Vorbis 1.0 spec notes, part 1
I have undertaken a small project of writing a Vorbis decoder completely from the spec, with the goal of catching any errors, both typographically and algorithmically, in the spec. My "reference" decoder is also being written in an extremely methodical style, with practically no algorithmic optimization, such that it will be clear that every step has been copied exactly from the spec.