#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, a, b;
    cin >> n >> a >> b;
    string disc;
    cin >> disc;
    for (int i = 0; i < n; i++)
      if (disc[i] == '1' && disc[i + 1] == '0') {
        disc[i + 1] = '1';
        i++;
      }
    vector<pair<long long, long long>> dp;
    dp.assign(n + 10, make_pair(1e18, 1e18));
    dp[0].first = b;
    for (int i = 0; i < n; i++) {
      if (disc[i] == '0')
        dp[i + 1].first = min(dp[i].first + a + b, dp[i].second + a * 2 + b);
      dp[i + 1].second =
          min(dp[i].first + 2 * a + 2 * b, dp[i].second + a + b * 2);
    }
    cout << min(dp[n].first, dp[n].second + a) << endl;
  }
}
